Skip to content

Configuring a cronjob

Cronjobs are automated scheduled tasks that run under your account. You can set them up yourself by logging in via SSH into your server or shared hosting account and entering the command line tools.

crontab  -e   # edit user's crontab
crontab  -l   # list user's crontab

The syntax is as follows:

# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12)
# │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday;
# │ │ │ │ │                                   7 is also Sunday on some systems)
# │ │ │ │ │
# │ │ │ │ │
# * * * * * <command to execute>

Some examples:

30 2  1 * *  /full/path/to/script  # This cronjob runs every first day of the month at 2h30.
0 22  * * 6  /full/path/to/script  # This cronjob runs every week on Saturday (6th day of the week) at 22h00.
0 */6 * * *  /full/path/to/script  # This cronjob runs every six hours (at 0h00, 6h00, 12h00 and 18h00)

For a more detailed guide, see also:

If you are not quite sure of the correct syntax, please send an email to support@sre.combell.com.
Please state the following in your e-mail:

  • The account on which to run the cronjob.
  • Exact path to the script.
  • Time at which it should be executed (once an hour, once a day, ...)
  • Email address to which to send the output of the script.