vicker313 tech blog

November 26, 2011

Setup CRON job to Trigger an URL

Filed under: Server — Tags: , — vicker313 @ 7:42 pm

The following CRON script can be used to trigger an URL (example below is schedule to run every minute, for other schedule setting please refer to other CRON tutorial).

0 * * * * wget -q -O - http://www.example.com/notify.php >/tmp/cron 2>&1

In Linux, wget is used to download file from internet (or network). -q option means quiet, -O means output file. It is important to put the -O option so that your server won’t end up with annoying CRON output file.

Create a free website or blog at WordPress.com.