Skip to end of metadata
Go to start of metadata

cron is a service used to run jobs on time-basis and is available on most UNIX-like operating system installations.

User 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 cronserver.

  • The crontab command on all O2 systems (login/compute) will automatically connect to cronserver for you.
  • The command is used in exactly the same way as on a standalone system.
  • Run man crontab for complete documentation or run crontab with 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

The 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 crontab editing buffer. This reminder will be removed after you save the file and before it is installed on cronserver.
  • For non-editing operations (list, crontab -l and 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 cronserver by running ssh cronserver hostname from any O2 system.
  • However, you should not rely on cron administration or execution being housed on any specific system.
  • If you need to refer to the system where cron jobs execute, be sure to use the role name cronserver.
  • If you need something to execute at a specific time on a specific O2 system, use ssh(1) to initiate that command from a cron job on cronserver.
    • 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 cron service.

  • No labels