Scheduling#

Any CLI command can be scheduled to run automatically, including but not restricted to backups and security upgrades.

By default there is no backup maintenance scheduled. Backup maintenance can be scheduled with the number of copies to be kept - refer to the backup maintenance topic.

Note

Scheduled commands will not run while the system is in maintenance mode. See System Maintenance Mode in the Platform Guide.

The automated job schedule format is as follows:

  • schedule add <job-name> <user-command>

  • schedule time <job-name> <hour> <minute>

  • schedule time <job-name> every <N> hours

  • Alternatively the job can be scheduled to run every week on Monday with schedule time <job-name> weekly 1; where 0 is Sunday, 1 is Monday, 2 is Tuesday, 3 is Wednesday, 4 is Thursday, 5 is Friday and 6 is Saturday

  • schedule enable <job-name>

Example:

schedule add mybackups backup create localbackup

schedule time mybackups 2 0

schedule time mybackups weekly 0

schedule enable mybackups

Among the tasks that can be scheduled are:

  • Backup creation, e.g. schedule add backupme backup create localbackup

  • Backup maintenance, e.g. schedule add backupclean backup clean localbackup keep 5

  • Health reports, e.g. schedule add reports diag report

Note

If a schedule is in a state where the last executed and next execution time are equal, then the next execution time will be recalculated to ensure its execution.