Current Tasks
The Current Tasks window lists the tasks that SQL Server Agent runs on the open company file at times you set, such as a backup every night or a repricing at month end. This page explains the window and what it opens: the Scheduled Task dialog, the task type wizard and the Schedule Tasks dialog. For the practical steps see Schedule a task.
These tasks are not the Share Center tasks (sending reports). The program itself runs Share Center tasks, and only while it is open. SQL Server Agent on the server runs these ones, whether the program is open or closed. See Difference from Share Center.
How a task runs
The program describes the command as: "Set a schedule upon which certain tasks to be performed automatically on daily or weekly or monthly basis."
Who runs the task
- SQL Server Agent on the server machine runs the task, not the program. When you click Ok in the task dialog, the program registers a task with steps and a schedule on the server, and its part ends.
- Each step is a command on the database of the file. Most steps begin by registering a connection under one of the administrator users of the file, and they skip the program's warnings. No step takes exclusive use of the file, so users may keep working while a task runs. Plan heavy maintenance outside working hours.
- On the server the task name starts with
[Ameen SJ]followed by the database name. So this list shows only the tasks of the open file. It does not show the automatic messages that the notifications system also prepares on the server.
When the first run happens
- Saving a task does not start it. The program sends SQL Server Agent the start date, the time, the end date and the repeat type. Agent then works out the first run: the first time in the schedule that falls after the moment of saving, on or after the start date.
- Example: a daily task at
02:00 AMwith today as the start date. If you save it at10:00 AM, the first run is at02:00tomorrow morning. - To run the task right away choose Run from the task menu. That does not change the schedule.
Repeating
| Type | When it runs |
|---|---|
| Daily | Every day at the time you set. |
| Weekly | One day of the week that you choose, at the time you set. |
| Monthly | One day of the month between 1 and 28, at the time you set. |
| Repeated Every a number of hours | On each day the schedule falls on, the task starts at the time you set and repeats at that interval until the end of the day, 23:59:59. |
The task does not run after To Date (the end date). See Schedule Tasks dialog.
When the program or the computer is off
| State at the scheduled time | What happens |
|---|---|
| The program is closed on your machine, or your machine is off | The task runs as usual, because SQL Server runs it. |
| The server machine is off, or SQL Server is stopped | The task does not run. |
| SQL Server Agent is stopped | The task does not run. A note about it shows at the top of Current Tasks when you open it. |
The program does not make up for a missed run when the server returns. SQL Server Agent carries on from the next scheduled time. A task that has never run shows the status Unknown in Statuses and appears in Scheduled Tasks Errors.
What is logged
- SQL Server Agent history: the result of each step and of the task at every run. Execution Log shows it. A failing step is retried up to three times, one minute apart, and the retries do not show in the log.
- The program's change history: the program stores in the file who modified a task, who disabled or enabled it, who used Suspend, and the date and time. Execution Log shows this too.
- The Log File: the program records adding, modifying and deleting a task under the type Scheduled Tasks (under Cards). See Log File.
- The program does not record Run and Stop Execution.
Where tasks are stored
The task, its steps and its schedule live on the server. The options of each step are stored in the company file. So:
- Tasks are not carried to a new file (see Create a new file). Create them again in the new file.
- When you carry balances forward, you can copy the tasks to the new file on the Scheduled Tasks page of the wizard: Scheduled Tasks.
- When you open this window, the program deletes from the file the options of steps whose task no longer exists on the server, and options that point to a deleted bill type, entry type, commercial paper type, material, group, cost center or warehouse.
Difference from Share Center
| Current Tasks | Share Center | |
|---|---|---|
| Who runs it | SQL Server Agent on the server | The program itself |
| Needs the program open | No | Yes, with the file open and you signed in |
| What it does | Maintenance, audit and backup on the file | Exports a report or dashboard and sends it by e-mail, WhatsApp or to a folder |
| Seen by | Everyone with permission on the file | The user who created it |
See Share Center and Schedule a report to send automatically.
Opening the window
- From the File tab click Tools, then Schedule. The page lists its items only when a company file is open.
- From the Backup page of Program Options: click Scheduled Tasks... in the Backup Schedule group. See Set backup options.
- From the Scheduled Tasks Errors report: the Current Tasks command in the right-click menu.
The Schedule item shows when your key includes accounting and the standard reports. In the subscription edition it needs the highest plan (Tools page). The item has a permission of its own in Users Management > Reports. Without it, clicking the item does nothing and the Scheduled Tasks... button does not show in Program Options.
The commands of the window have permissions in Users Management > Operations, in the section of the Tools library: Scheduled tasks - Add new task, Scheduled tasks - Modify task, Scheduled tasks - Delete task, Scheduled tasks - Preview execution log, Scheduled tasks - Preview task details, Scheduled tasks - Activate/Deactivate task, Scheduled tasks - Deactivate task partially, Scheduled tasks - Execute task directly and Schedules tasks - Stop task execution in process. Modify, delete, activate, deactivate, run and stop have an extra condition: you must also hold the permission of every step type in the task (see Task type).
The Current Tasks window
At the top is the note "Note: To execute schedule, ensure that SQL Server Agent is running." When the window opens, the program asks the server for the state of the service. If it is not running, the note is replaced by "To execute tasks, you need to run SQL Server Agent". If the program cannot ask, the first note stays. A second note always shows under it: "Note: Some maintenances are risky and may cause slow at work or stop some features while executing the task, so it is preferred to schedule it out of work time to avoid slow and suspension."
The list fills with the tasks of the file in order of creation, and the first task is selected.
List columns
| Column | What it shows |
|---|---|
| Task | The task name as you typed it. |
| Schedule | The schedule description: Daily, Weekly or Monthly, then At and the time, then Repeated Every and the number of hours if it repeats, then From and the start date. Weekly adds On and the day name, monthly adds On and the day number Of Month. The end date is not shown. Example: "Daily At 2:0:0 AM From 05-12-2026". Minutes and seconds show without a leading zero. |
| Last Run Status | The result of the last run. See Statuses. |
Statuses
| What shows in the column | When |
|---|---|
In process In step No. then the step number and its type in brackets, such as 1 (Backup) | The service is running the task now. It shows in a header font. The list does not update itself, so click Refresh. |
| Succeeded and in brackets the date and time of the last run | The last run ended successfully. |
| Failed and the date and time | The last run failed, or ended with any result other than success, cancel or not run. |
| Unknown and the date and time | You stopped the task while it ran, with Stop Execution. |
| Unknown alone | The task has never run. |
| Permanently Disabled before any status above | The task is disabled. Its row shows in a faded colour. If it is running, only the running status shows. |
Buttons
| Button | What it does | When it is disabled |
|---|---|---|
| Execution Log | Opens the Execution Log report for the selected task. | Without the permission Scheduled tasks - Preview execution log, or when the list has no task. |
| New | Opens an empty Scheduled Task dialog. See the task dialog. After Ok the list refreshes and the program records the addition in the Log File. | Without the permission Scheduled tasks - Add new task. Checked when the window opens. |
| Modify | Opens the Scheduled Task dialog with the selected task. The program records the change in the Log File and in the execution log. | Without the permission Scheduled tasks - Modify task, or without the permission of one of the task's step types, or when the list has no task. |
| Delete | Asks "Are you sure you want to delete?" with the buttons Delete and Cancel. Then it deletes the task from the server with its history there, deletes its options from the file and records the deletion in the Log File. | Without the permission Scheduled tasks - Delete task, or without the permission of one of the step types, or when the list has no task. |
| Refresh | Reads the list again from the server and keeps the selection on the same row if it can. | Never. |
| Close | Closes the window. | Never. |
Execution Log, Modify and Delete are re-evaluated each time you change the selected row.
Right-click menu
Right-click a task. The menu starts with Grid Lines, as in report lists, then the window adds its items. An item appears only if you hold its permission and the permission of every step type in the task (except Task Details). An item that does not fit the task's state cannot be chosen.
| Item | What it does | Available when |
|---|---|---|
| Activate | Reactivates a disabled task so it runs at its times. The program records the action in the execution log. | The task is disabled. |
| Permanently Disabled | Disables the task until you activate it. Its status shows Permanently Disabled, and it appears in Scheduled Tasks Errors as Disabled. The program records the action in the execution log. | The task is enabled. |
| Run | Starts the task on the server now, unless it is already running. The program shows no message if the server refuses. | The task is not running. |
| Stop Execution | Asks the server to stop the running task. | The task is running. |
| Suspend | Skips the next run only. See Suspend. | Always (with the permission). |
| Task Details | Opens the Task Details report. | Always (with the permission Scheduled tasks - Preview task details). |
The list refreshes after each item.
Suspend
It skips the task at its next time, then the task goes on as usual. The program moves From in the task's schedule instead of disabling the task, so the task does not show as disabled.
- Choose Suspend.
- The program asks "Do you want to disable the task for next time only ?" and shows Task Name and Next Execution, which is the schedule description with the new start date. The buttons are Yes and No.
- Yes saves the change and records Suspend in the execution log. No changes nothing.
How the program works out the new date: it moves the start date forward by the task's period (one day, seven days or one month) until it reaches today. If that date is today and the run time has passed, it moves it one more period. Then in every case it moves it one last period and saves it. If the new date is after To Date, the message "The process can't be completed, next execution date is later than task end date in schedule" appears and nothing changes.
Example: a daily task at 10:00 with start date 01-12-2026. You choose Suspend on 05-12-2026 at 08:00. The start date becomes 06-12-2026, so the task skips today's 10:00 run and goes on tomorrow.
The Scheduled Task dialog
It opens from New or Modify. Its title is Scheduled Task. It holds the task name, its steps and its schedule.
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Task Name | The name of the task in the list and in its reports. | Yes | Text up to 250 characters. It must not repeat the name of another task in the file. You can change it when modifying. |
| Scheduled Maintenances | The steps of the task, in the order they run. Steps run from top to bottom. | At least one step | The column Maintenance is the step type. The column Stop the process when it fails is a check box. You can add the same type more than once, and the step name gets the repeat number. |
| Schedule description (beside Schedule...) | Shows the schedule in the same form as the Schedule column. | Yes | Shows "Not scheduled" until you set the schedule. |
Stop the process when it fails: when checked, the task stops and counts as failed if this step fails. When not checked, the task goes on to the next step. The check box is disabled on the last step, because the task ends after it.
If a step without this box fails and the last step succeeds, the task shows Succeeded. Check each step's result in the Execution Log.
When you open a saved task, its last step shows the box selected. If you add a step after it or move it up, the box stays selected; clear it if the task should go on after that step fails.
Buttons
| Button | What it does |
|---|---|
| New | Opens the task type wizard to add a step at the end of the list. |
| Modify | Opens the options page of the selected step directly, without the type page. Disabled for types with no options (Audit Accounts Balances and Reindex Files). |
| Delete | Removes the selected step from the list at once, with no confirmation. Nothing is saved before Ok. |
| Up arrow and down arrow (beside the list) | Move the selected step one place up or down. Disabled when the list has one step. |
| Schedule... | Opens the Schedule Tasks dialog. |
| Ok | Checks, then saves the task on the server. Disabled while the list has no steps. |
| Close | Closes the dialog without saving. It becomes Cancel after any change. If there are unsaved changes and the On cancel warning option is on, the program asks about discarding them (Messages). |
After New, Modify and Delete the list goes back to the first step. After an arrow, the selection stays on the step you moved.
What Ok checks
The program checks in order: the name, then the schedule, then the steps. Then it checks the start and end dates when it sends the schedule to the server. The check messages are in Messages.
When modifying, the program saves the task with the new name, deletes its old steps and old schedule, adds the steps and the schedule again, and records the change. The task itself and its execution history stay. When adding, the task is created enabled. The whole operation runs in one transaction: if any part fails nothing is saved.
The task type wizard
It opens from New in the task dialog. The window title is Scheduled Tasks. It shows the text "This wizard will guide you in an easy and step by step way through the operations of tasks- scheduling." and then the Task list of step types.
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Task | The type of step you add. | Yes | The list shows only the types you hold the permission for. The first one in the list is selected at first. |
The step types in the order they appear:
- Backup
- Audit Materials Balances and Prices
- Fixed Weighted average account
- Audit Accounts Balances (no options page)
- Shrink Database
- Reindex Files (no options page)
- Reprice Bills and Generate their Entries
- Reprice Manufacturing Operations Invoices
- Regenerate Manufacturing Operations Invoices
- Regenerate Entries
- Generate Entries And Post Bills
- Posting Entry Vouchers
- Empty the tables that contain temporary results
- Audit Files
- Regenerate Cost Entries
The options page of each type is in Scheduled task steps. Each type matches a maintenance wizard under Files Maintenance, and its operation is explained in Files maintenance operations.
A type shows in the list only if you hold the permission of the same operation in Users Management > Operations. Someone without the permission of a type cannot modify a task that contains a step of that type.
Wizard buttons
| Button | What it does |
|---|---|
| Next | Opens the options page of the chosen type. Disabled for the two types with no options. |
| Finish | Shows only when the selected type has no options: adds the step at once. |
| Back | Returns to the previous page. Disabled on the first page. |
| Cancel | Asks "Are you sure you want to stop the process?" with Yes and No. Yes closes the wizard without adding the step. |
Finish also shows on the step options page. It adds the step with its options to the list of the task dialog. Nothing is saved on the server before Ok in the task dialog. When you Modify a step, the wizard starts at its options page. The wizard has the general form of the maintenance wizards (How the maintenance wizards work).
If you lack the permission of some types, Next and Finish follow the type at the same position in the full list of 15 types, not the type you selected. Next may then show for a type with no options and open an empty page, and Finish may show for a type with options and add the step without them.
Schedule Tasks dialog
It opens from Schedule... in the task dialog. Its title is Schedule Tasks, and it has a Schedule group.
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Schedule Type | The repeat type. | Yes | Daily, Weekly or Monthly. The default for a new task is Daily; when modifying it is the task's type. The type changes which fields are available. |
| On day … of the month | The day of the month the task runs. | For Monthly | A whole number from 1 to 28. Disabled for other types. Empty in a new task. |
| On | The day of the week the task runs. | For Weekly | Sat, Sun, Mon, Tus, Wed, Thr, Fri in this order. Disabled for other types. The default is Sat. |
| Once | The task runs once on its day. | — | Option button. The default for a new task. Choosing it disables the hours box. |
| Every … Hour | The task repeats on the same day at this interval, from the time until the end of the day. | — | Option button instead of Once. It enables the hours box: a whole number from 1 to 24. |
| Timing (H, M, S) | The time of the run (or of the first run of the day when it repeats). | Yes | H (hour) 1 to 12, M (minutes) 0 to 59, S (seconds) 0 to 59, and the AM or PM list beside them. For a new task they start with the current time of your computer, and the AM/PM list follows it. |
| From date | The first day the task may run. | Yes | A date. The default is today. |
| To Date | The last day the task runs. | Yes | A date. The default for a new task is the Closing Date in Program Options. It must not be before From date. |
Ok checks the fields and keeps the schedule in the task and in the parent dialog. It does not save on the server. Close closes without saving (and becomes Cancel after a change).
Once and Every: if you choose Once after typing a number of hours, the program still reads the number in the box, even though the box is disabled, so the task stays repeating at that interval. Clear the box before choosing Once.
If the task's schedule was Weekly or Monthly (saved, or confirmed with Ok in this window) and you change it to Daily, the program keeps the earlier day value, so the task runs every few days instead of every day: every 2 days for Monday, every 64 days for Saturday, every 15 days for day 15 of the month. For a daily task, delete the task and create it again with Daily.
Example: a weekly task on Sunday at 02:30 AM, from 06-12-2026 to 31-12-2026. It runs on Sundays 06-12-2026, 13-12-2026, 20-12-2026 and 27-12-2026 at 02:30. With Every 4 hours it runs on each of those Sundays at 02:30, 06:30, 10:30, 14:30, 18:30 and 22:30.
Messages
| Message | Why it appears | What to do |
|---|---|---|
| You don't have authority to view tasks | The SQL Server account the program connects with cannot read the server's tasks, so the list opens empty. | Ask the SQL Server administrator to allow the account. |
| To execute tasks, you need to run SQL Server Agent | The service is stopped, or SQL Server refused a command because it is stopped. | Start the service on the server. |
| The task without name, with "Please name the task" under it | You clicked Ok with Task Name empty. | Type the name. |
| The task with no schedule, with "Please schedule task by pressing on "Schedule" command" under it | You clicked Ok and have not set the schedule. | Click Schedule.... |
| The task with no maintenance, with "Please add one maintenance at least" under it | You clicked Ok and the list has no steps. | Add a step. |
| Sorry can't save, the task with no steps, the task should have one step at least | No steps at save time. | Add a step. |
| Name exists! Please enter different name | A task with the same name exists in the file. | Change the name. |
| Sorry can't save, the task not found | The task no longer exists on the server, for example another user deleted it. | Click Refresh in the list. |
| Sorry can't save, the task has been modified by other user | The server refused to save a step because the task already has a step with the same name. | Click Refresh and make the change again. |
| The task is really active/inactive. Kindly update the tasks list | Another user changed the task's state before you. | Click Refresh. |
| Select hour between 1 and 12 | H is outside 1 to 12. | Correct it. |
| Select Minutes between 0 and 59 | M is outside 0 to 59. | Correct it. |
| Select Seconds between 0 and 59 | S is outside 0 to 59. | Correct it. |
| Select Hour between 1-24 | You chose Every and the number is outside 1 to 24. | Correct it. |
| Select the day between 1 and 28 | The type is Monthly and the day is outside 1 to 28. | Correct it. |
| Start date is more than End date | From date is after To Date. It appears when you click Ok in the task dialog. | Correct both dates from Schedule.... |
| Are you sure you want to stop the process? | You clicked Cancel in the task type wizard. | Yes cancels adding the step. No keeps you in the wizard. |
| Are you sure you want to delete? | You clicked Delete in the list. | Delete confirms and Cancel goes back. |
| Do you want to disable the task for next time only ? | You chose Suspend. | See Suspend. |
| The process can't be completed, next execution date is later than task end date in schedule | Suspend would pass To Date. | Change To Date, or do not skip this run. |
Related
This page applies to alameen ERP 10, version 10.1.79.764.