It is possible to use cron on the web hosting server, but not on
access.nsms.ox.ac.uk where cron is disabled. To run a cron job, create a file called
crontab in the directory
access.nsms.ox.ac.uk. The web server will then copy this into place, as this file is synchronised once every 5 minutes.
<site>/cron/crontab file should follow the usual syntax for
crontab files. An internet search for 'crontab examples' may also provide helpful examples.
N.B. Users are strongly recommended to set an email address where the output of tasks will be sent. This can be done by adding
MAILTOfirstname.lastname@example.org to your crontab file; if you do not do this, you will not receive any output from your jobs.
One example of this is to enable the polling of cron jobs on a Drupal site every 15 minutes. To do this (using
curl) you would create the file
sitename.ox.ac.uk/cron/crontab with contents:
# Set recipient email address for task output MAILTOemail@example.com' # Poll Drupal cron every 15 minutes 15/* * * * * curl --silent -o /dev/null http://site.ox.ac.uk/cron.php
Note you can also use
wget rather than
curl to do this.