Cron Jobs Tips

From AWBS Wiki
Revision as of 23:24, December 1, 2008 by Awbsrob (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

There are different options you can use in your cron job setup that will ensure they are all running successfully.

ALWAYS Setup setup your Crontab with an E-Mail address to mail to if there is errors!

Identifying your PHP version and Location for cron jobs

This is important to check, as a good majority of servers are running 2 versions of PHP, your cron jobs could be using a different version then your website.

PHP Version Check

  1. . Make sure an e-mail address is set for your cron jobs.
  2. . Create a new cron command. Set it to run every 2 minutes ie */2 in the minute field on most Hosting Panels.
  3. . In the command field enter PHP -v
  4. . Save and wait a minute or two, then check the e-mail you specified in step 1. Keep checking until you get an e-mail from your Cron job.
  5. . Delete the cron job you created for this so you don't receive any more e-mails.
  6. . Read the e-mail received to see the PHP version being used by the cron jobs.

Location of PHP

Use the same method as in PHP Version Check, but use the command which php'