cron is a service used to run jobs on time-basis and is available on most UNIX-like operating system installations.
cron jobs on O2 are run on a single server,
cronserver.rc.hms.harvard.edu, and can be managed from any O2 login/compute node.
You don’t have to do anything special to manage your
crontab data on
crontabcommand on all O2 systems (login/compute) will automatically connect to
- The command is used in exactly the same way as on a standalone system.
man crontabfor complete documentation or run
crontabwith no arguments for a brief usage summary.
- To use a different editor than the default:
env EDITOR=vim crontab -e(substitute the editor of your choice, e.g. emacs, pico, nano, etc. for “vim” in this example)
General crontab help
Usage: crontab [options] Options: -e or --edit edit user's crontab -l or --list list user's crontab -r or --remove delete user's crontab
crontab command will remind you about
cron service as follows:
- For editing operations (
crontab -e), a brief reminder and reference to this page will be included in the
crontabediting buffer. This reminder will be removed after you save the file and before it is installed on
- For non-editing operations (list,
crontab -land remove,
crontab -r), a brief reminder and reference to this page will be printed on standard error. You can differentiate this text from the actual output of
crontab(1), which appears on standard output.
If you need to know the details of where
cron jobs are run:
- You can find which O2 application server currently houses
ssh cronserver hostnamefrom any O2 system.
- However, you should not rely on
cronadministration or execution being housed on any specific system.
- If you need to refer to the system where
cronjobs execute, be sure to use the role name
- If you need something to execute at a specific time on a specific O2 system, use
ssh(1)to initiate that command from a
- We recommend that you contact us if you do this to make sure you are running your job in an appropriate location and that you are using service role names and application role users when needed.
Finally, remember that any workloads with significant processing, memory, or storage I/O requirements should be run on an O2 compute node via the SLURM. Please refer to our
Using Slurm Basic Guide
Please contact Research Computing if you have any questions about O2