.. index:: pair: Tutorial; Index .. _cron_jobs: ================ Cron-Like Jobs ================ RCC does not currently support cron on any nodes. The reason for this is because cron jobs are tied to a specific machine. However, the system configuration expects that no permanent user data should be stored on a login or compute node. This allows a compute node or login node to be replaced, reinstalled, updated, etc. at any time with no impact to a user because there is no permanent data stored on a node. Supporting cron in this environment would likely lead to cron jobs being lost with no way to notify users. It is possible to use Slurm to schedule periodic jobs but it will not be possible to have jobs run on a strict schedule like what is possible with cron. .. note:: Due to the possibility of abuse you must email help@rcc.uchicago.edu and request access to submit cron-like jobs. These jobs are subject to strict scheduling limits and will be monitored for abuse. An example submit file is :download:`cron.sbatch`: .. literalinclude:: cron.sbatch :language: bash This script just echoes the hostname and date but a more useful command would have been submitting another regular job. It is important to note that this script resubmits itself at the end of the script. We add the :option:`--begin` with a specific cron schedule to determine the next time the job should start. These jobs use a separate partition, account, and QoS, which should not be changed. The **cron** partition is made up of login nodes and only accepts cron jobs, so there should be little problems scheduling jobs at specific times. Cron jobs will persist until they are cancelled, have a problem resubmitting themselves, or job state for the entire cluster is lost. It would probably be wise to add mail notification to these scripts if necessary. It should be very rare for the job state of the cluster to be lost.