Cron Jobs

Cron Jobs allows users to schedule a regularly occurring task within their server. Most content management systems require some sort of regular maintenance which is triggered by requesting a very specific URL in a website. Cron jobs can be used to get your server to issue such a request to itself automatically.

There are two methods for creating a Cron Job.

Create Cron Job via the Administration Panel (Easy)

To create a Cron Job, log into your account on the Administration Panel, and then click the Cron button at the top of the page. Once on the Cron page, click the Plus button.

Create Cron Job via the Secure Socket Shell (Advanced)

To create a Cron Job log into your server via SSH.

In the command line type crontab -e

If prompted to choose an editor, select Nano as your editor.

Cron Expressions

A Cron Job is structured in the following format:

Minute (0-59) Hour (0-23) Day of Month (1-31) Month (1-12) Day of Week (0-6) (Sunday to Saturday) Linux Command

Cron Jobs use the wildcard character (*) to denote every possible value within the unit of time for the respective position.

Examples

Frequency Syntax
Every minute * * * * *
The top of every hour 0 * * * *
Every day at midnight 0 0 * * *
Every Wednesday at midnight 0 0 * * 4
5:00 PM on the first day of the month 0 17 1 * *
Every 15 minutes */15 * * * *
Midnight of the first day of the year and only if it falls on a Sunday 0 0 0 0 0

More information about Cron expressions can be found at Wikipedia.

Linux Commands

To have your server fetch a webpage use the following command.

wget -O - -q -t 1 (full webpage address)