By Joseph De Araujo

| Minute of the hour Set to a number between 0 – 59 for the corresponding minute of the hour or * for every minute |
| Hour of the day Set to a number between 0-23 for the corresponding hour of the day or * for every hour |
| Day of the month Set to number between 1-31 for the corresponding day of the month or * for every day |
| Month of the year Set to a number between 1-12 for the corresponding month of the year or * for every month You can use the name of the month of the year as well eg. march (not case sensitive) |
| Day of the week Set to a number between 0-7 for the corresponding day of the week (‘0’ or ‘7’ is Sunday) You can use the name of the day of the week as well. Eg. Tuesday (not case sensitive) |
| Beginning of the command line Here you specify the path to PHP or Perl and any ‘flags’ you might need. |
| The path to your script Specify the path to your script that you want to run. |
1. Let’s find the path to your installation of PHP. Type which PHP in a command line or just ask your host what it is.
2. Let’s find the path to your script. Find out your document root to your site, then add the path to the script. Eg. /home/user1/public_html/sendstudio/users/send_emails.php and /home/user1/public_html/sendstudio/users/send_autos.php. If you don’t know what your document root is, then you can either use a PHP info file to look for your document root.
3. Decide what frequency you wish to run the script. For every hour on the hour, you would use 0 * * * *
4. Create the cronjob. Login to telnet or your control panel and type crontab -e at the command line. This will let you edit your crontab file. Enter
0 * * * * /bin/php –q /home/user1/public_html/sendstudio/users/send_emails.php
0 * * * * /bin/php –q /home/user1/public_html/sendstudio/users/send_autos.php
5. Sit back and let cron do the rest.
Login to your control panel and look for the cronjobs icon There are two ‘modes’ to set cron jobs in Cpanel – you can choose either the standard or the advanced mode.
.
Login to your Plesk control panel and look for the crontab icon

|
said this on 06 May 2006 5:31:30 PM CST
Thanks for this very neat article. Its a great help, especially because I have a PLESK server and their instructions tend to assume that you already know this info. PLESK should have a weblink to this page from their manual!
|
|
said this on 11 May 2006 12:26:01 PM CST
Thank you for the article. It very clearly answered one of my questions.
|
|
said this on 26 May 2006 3:44:16 AM CST
Great i was looking for this things for days now and it worked . Thanks Thanks a LOT. This article has jsut solved one of my biggest problems. Now if possible could you help me know that how to make a cron job through php. I mean my script itself make changes inteh crontab file instead of using cpanel.
|
|
said this on 30 May 2006 4:17:41 AM CST
This article realy gave me a clear picture about coning a php script using cpanel. Thanks!
|
|
said this on 01 Jun 2006 9:40:33 AM CST
A great intro to cron!! Really liked the colour seperation to break up the command, very easy to follow.
|
|
said this on 21 Jun 2006 6:57:59 AM CST
A nice intro to cron!! very easy to follow it.
|
|
said this on 25 Jun 2006 1:17:43 PM CST
Thank you for this very clear explanation!
Best, Evan Davis |
|
said this on 28 Sep 2006 11:55:42 PM CST
Thank for very clear explanation! Now i know what Cron is :)
|
|
said this on 10 Nov 2006 3:46:42 AM CST
Great article... but i have another issue (related to sendStudio mainly): i wanted to send emails like one every minute, since i don't have such a large list. What i don't get is: when the SendStudio gets called, through it's send_emails.php, does it send all mails at once? How can i make it send only 1 email every minute, or hour, or day or whatever, respecting the cron settings?
I ask this cause i fear being banned by yahoo if in the From or ReturnPath of the newsletter appears a yahoo email address. Thanks for the article though, really informative [ Editors note: You can do this by editing the user settings for the user sending email, and setting the hourly limit to 60. This will force only one email to go out per minute. SendStudio NEVER sends all the emails out at once and using this setting you can specify how many you want to go out etc. It also spaces out the emails so it doesnt send 60 in 3 minutes and then waits.. instead it sends out 1 per minute ] |
|
said this on 10 Feb 2007 5:18:02 PM CST
Muy bueno. Excelente.Great i was looking for this things for days now and it worked . Thanks Thanks a LOT. This article has jsut solved one of my biggest problems. Now if possible could you help me know that how to make a cron job through php. I mean my script itself make changes inteh crontab file instead of using cpanel.
|
|
said this on 27 Feb 2007 4:37:21 AM CST
Great article! It saved my few minutes.
|
|
said this on 26 Mar 2007 5:15:12 AM CST
Very neat and clear to understand
|
|
said this on 16 Apr 2007 5:26:52 AM CST
thanks! this is only tutorial that actualy explains it properly
|
|
said this on 02 Jul 2007 9:21:27 AM CST
Best info about cron I have seen.
A bit more about command lines would be great! Sometimes I see spaces in lines So I wonder which is correct or does it matter? |
|
said this on 02 Nov 2007 11:27:00 PM CST
You made cron jobs so clear. Loved the color settings, but more importantly the explanations. Big thanks!
- Gary |
|
said this on 06 Nov 2007 11:23:33 PM CST
WoW, thanks for the author who ever created this article regarding CRON Jobs. This is one of the best guide i have ever seen related to CRONJOBS.
The author has clearly mentioned by separation the command path, file path and other attributes. Which is given in a pictorial form. And shown in a clear color images. It solved one of my toughest problems i was facing for cronjobs setup. Now i have become a expert in cronjobs setups. Great work, Thanks once again. |
|
said this on 29 Dec 2007 12:53:13 AM CST
Thanks, This is very good and it solve my doubts.
|