AX2552
Defining scheduling rules for a job
Once a job has been created, you can run it on demand, or you can schedule it for future execution. Jobs can be scheduled to be run one time, or on a recurring basis. To schedule a job, you define scheduling rules for the job.
You can add, edit, and remove the scheduling rules for a job at any time using the Scheduling Rules section of the job properties. You can also flag a rule as active or inactive. If a job has no scheduling rules, or if all of its scheduling rules are inactive, then it will not be run unless it is run manually by a user.
If a job is saved with an active scheduling rule, then Axiom Software determines the next scheduled instance of the job and places it in the scheduled jobs list. Once that instance has been processed, the next scheduled instance is determined and scheduled, and so on. Each time the job is run using an active scheduling rule, it is run as the current job owner (unless the job is a system job, in which case it is run as the Scheduler Service System identity).
If a job has multiple active scheduling rules, Axiom Software evaluates all of the rules and schedules a single instance of the job, for the earliest time allowed by the rules. Multiple scheduling rules do not result in multiple scheduled instances of the job.
NOTE: If a time zone is listed on the Scheduling Rules section of the job, then the defined rules will be evaluated in the context of that listed time zone. Otherwise, scheduling rules are evaluated in the context of the local time zone for the Scheduler Server. If necessary, the system configuration setting SchedulingBehaviorTimezone can be used to specify a particular time zone for evaluating scheduling rules.
Adding a Scheduling rule
You can add a scheduling rule to a job to schedule it for future execution, either one time or on a recurring basis.
If you only plan to run the job manually on demand, then you do not need to create a scheduling rule.
To add a scheduling rule to a job:
- In the Scheduler dialog, open a job to edit or create a new job.
-
In the left-hand side of the job, select Scheduling Rules.
By default, this area is empty. You must add a rule in order to define scheduling for the job.
-
On the Job tab of the Scheduler ribbon, in the Scheduling Rules section, click Add.
A new row appears in the right-hand side of the job. By default, the new row is active, but does not have start / end dates or any specific recurrence settings.
-
Complete the following settings within the row as needed:
Item Description Active
If you want the job to be placed on the schedule as soon as you save the job with the new scheduling rule, then you should leave this option checked.
However, if you just want to save your schedule settings but you are not ready to begin scheduling the job, then you can clear the Active check box for the rule. The job will not be scheduled until it is saved with an active scheduling rule.
Starting On
Ending On
Optional. These dates specify the time frame for the scheduling rule. The starting date defines the earliest point in time that the job can be scheduled, and the ending date defines the latest point in time that the job can be scheduled.
If these dates are not defined (left blank), then the job will be perpetually scheduled according to the rule settings, as long as the rule is active.
If you want to schedule a one-time job, then set the starting / ending dates to the same date and time.
NOTE: Your system locale determines the format of dates.
Day of Week Specify the day(s) of the week that you want the job to be run:
*
(Default): The job will be run on all days within the start / end range.0
-6
: The job will be run on the specified day or days, where 0 is Sunday and 6 is Saturday. Use a comma or a hyphen to separate multiple days (hyphen if the days are contiguous, commas if not).
For example, you can enter
1,3,5
for Monday, Wednesday, and Friday, or enter1-5
for Monday through Friday.Hours Specify the time of day (hours) that you want the job to be run, in relation to the specified days:
*
(Default): The job will be run on all hours.0
-23
: The job will be run on the specified hour or hours, where 0 is midnight and 23 is 11:00 PM. Use a comma or a hyphen to separate multiple hours (hyphen if the hours are contiguous, commas if not).
For example, you can enter
0,12
to run at midnight and noon, or enter0-12
to run every hour from midnight to noon.Minutes Specify the time of day (minutes) that you want the job to be run, in relation to the specified hours:
*
(Default): The job will be run on all minutes (essentially the job is run continuously, once per minute).0
-59
: The job will be run on the specified minute or minutes of the hour, where 0 is the first minute of the hour and 59 is the last minute of the hour. Use a comma or a hyphen to separate multiple minutes (hyphen if the hours are contiguous, commas if not).
For example, you can enter
0,30
to run at the top of the hour and the half hour, or enter0-30
to run every minute from the top of the hour to the half hour.NOTE: If you specify an hour, then in most cases you should also specify a minute (such as 0 to run the job at the top of the specified hour). If you enter an hour but leave the minutes at the default asterisk, then the job will run every minute in that hour.
If the Active check box for the rule is selected when the job is saved, then Axiom Software will calculate the date and time of the first scheduled execution and will place the job on the schedule.
Editing a scheduling rule
You can edit a scheduling rule at any time, to toggle between active and inactive, and to change the start / end dates and recurrence settings.
NOTES:
- If a pending instance of this job is currently on the schedule, and you edit the scheduling rule, the pending instance will be updated to match the new schedule.
- If you inactivate a scheduling rule, any currently scheduled instances of the job will be automatically removed from the schedule.
To edit a scheduling rule:
-
In the Scheduler dialog, open a job to edit or create a new one.
-
In the left-hand pane of the job, select Scheduling Rules.
The defined rules display in the right-hand pane of the job.
-
Make any desired changes directly within the scheduling rules grid.
Deleting a scheduling rule
You can delete a scheduling rule at any time. If a job has no active scheduling rules, it will not be processed unless it is manually run.
To delete a scheduling rule:
- In the Scheduler dialog, open a job to edit.
- Select the Scheduling Rules section of the job, and then select the rule that you want to delete.
-
On the Job tab of the Scheduler ribbon, in the Scheduling Rules group, click Remove Selected.
Alternatively, if you want to delete all scheduling rules for the job, click Clear All.
Any jobs in the scheduled jobs queue that were related to the deleted rule(s) are also deleted.
Scheduling rule examples
The following are some example schedules and the rules used to achieve them:
Schedule | Start/End | Day of Week | Hours | Minutes |
---|---|---|---|---|
Weekdays at 11:00 PM | <optional> | 1,2,3,4,5 |
23 |
0 |
Every 15 minutes | <optional> | * |
* |
0,15,30,45 |
Mondays at 11:30 PM | <optional> | 1 | 23 | 30 |
One time (6/30/2019) at 1:30 PM (Option 1) |
Start: 06/30/2019 00:00 End: 07/01/2019 00:00 |
* | 13 | 30 |
One time (6/30/2019) at 1:30 PM (Option 2) |
Start: 06/30/2019 13:30 End: 06/30/2019 13:30 |
* | * | * |
Every Wednesday in July at noon |
Start: 07/01/2019 00:00 End: 08/01/2019 00:00 |
3 | 12 | 0 |
Continuous | <optional> | * | * | * |