Job Scheduling in MAS

From Vendita MAS
Jump to: navigation, search



Processes in MAS can be run on a periodic schedule, as is commonly done on UNIX systems with the “cron” utility. This is particularly useful when monitoring applications and servers, as it can provide a regular sample of information or a current status on a schedule determined by the administrators.

To create a periodic, scheduled job in MAS, first identify the job that is to be run from either the “ALL” or “Processes” tab of the “Entities” section in the UI:



On the right-hand side of the browser, you will see operational options for each of the processes. Click on the “Schedule” button associated with the process that is to be executed periodically.



A new dialog box will open. In addition to the parameters required for the execution of the process, the user will need to supply a name, description, and schedule information:



The “Name” field is used to assign a unique name to the job. Like other MAS names, it must not contain whitespace or special characters.

The “Description” field is a free-form field that can hold any information about the job that may be beneficial in the future. Typical field content might include why the job is being run or who to contact for support.

Following these two fields in the dialog box are five fields that are used to control the scheduling of the job:

  •  ? min: The minute(s) on which the job will execute

  •  ? hr: The hour(s) on which the job will execute

  •  ? day: The day(s) on which the job will execute

  •  ? mon: The month(s) on which the job will execute

  •  ? wkd: The weekday(s) on which the job will execute


If any value is left blank, a “*” will be placed in the field when the schedule is saved, indicating that the job can execute at any minute, hour, day, month, and weekday, respectively. If a value is specified, the execution is limited to the time or day described by the value. The values of all five fields must be met for a job to be executed. This is similar to the way a “crontab” file is used in UNIX.

As an example, a job scheduled to run with fields set to “5” “10” “*” “3” “5” will execute at 10:05 AM on any Friday that falls on the 3rd of any month.

Valid values for each of the fields also follow “crontab” conventions:

  •  ? Weekdays are specified from 0 (Sunday) through 7 (another way to specify Sunday) or with a three-character name: “Sun”, “Mon”, “Tue”, “Wed”, “Thu”, “Fri”, or “Sat”

  •  ? Hours are based on a 24-hour clock and can take a value between 0 and 23

  •  ? Minutes can range between 0 and 59

  •  ? The day of the month can be between 1 and 31 (note that 29, 30, and 31 may not be possible during some months and will never “trigger”)

  •  ? Months can take a numeric value between 1 and 12 or a three-character month name (“Jan” – “Dec”)

  •  ? Ranges are supported and are specified as begin-end, for example a hour range of “9-5”. Note that weekday and month names are not supported in ranges.

  •  ? Multiple values are supported and are specified as a comma-separated list. The list items may include ranges, for example a month field may take the value “1,3-6,9”

  •  ? “Step values” may be specified; as an example, to specify that a job should be run every ten minutes, the minute field may be entered as “*/10”. This is equivalent to the list “0,10,20,30,40,50”. This may be combined with a range: “20-40/2” will run a job every two minutes between 20 and 40 minutes past the hour


Once scheduled, the job will show up on the “Schedule” tab of the “Entities” screen in the MAS UI.



Two buttons are displayed; they work as expected: the “Edit” button will allow a user to modify the job parameters through a dialog box similar to that used when the schedule was first defined; the second button will permit a user to delete the job after requesting confirmation.

Output from the job will be shown in the “Jobs” screen along with the output from other jobs in the system.