Setting up Cron Jobs

The cron Job is the Linux version of Windows Scheduled Tasks.

To setup a cron you can choose to use the simple setup screen or the advanced screen.

Using advanced the cron will look like this:
0 9 * * * * /home/mysite/cgi-bin/somescript.cgi

For those that wish to use the advanced screen below is a breakdown of the syntax.

Each is a number or wild card where a asterisk ( * ) is the wild card.
Minutes are from 0 to 59
Hours are from 0 to 23
Day is from 1 to 31
Month is from 1 to 12
Day of Week is from 0 to 6

Hours are in 24 hour format so 13 would be 1 PM
Zero = 12 AM
For day of the week zero equals Sunday.

To run a PHP script use either these two methods.

php -q /home/username/public_html/script-name

or

curl -s /dev/null http://websitename/script-name

For a full list of curl usage go to http://curl.haxx.se/docs/manual.html



  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

File permissions

File Permissions Problems When you upload a file the default permission set may not work for the...

FTP common mistakes

Common FTP mistakes In most cases when users upload files using FTP all goes well. In some cases...

Account Upgrade or Downgrade or Dropping

Upgrading or Downgrading or Dropping an Account If you wish to change your account to a plan...

Page errors on Secure pages

SSL Common Page errors Most make this mistake with images when setting up Shopping Carts or...

Tuning up your Web Site

We also own Two websites that offer help in areas such as promotion and SEO issues. I have just...