View Full Version : Cron Job Confusion
Reid Montague
07-02-2009, 07:56 PM
Hello,
I was watching Donna`s very well mapped out installation video and when it got time to the Cron Jobs, she put her Cron Job Path in there but set the Cron to run 20 minutes after midnight, now Delavo sais: "Your should set up the following command in your crontab to run HOURLY"
So should I stick with the 20 minutes like Donna (*/20) or make it to where it runs hourly, and if this is the case, how do i make it run hourly?
Thanks
Reid
Brian Collins
07-02-2009, 08:21 PM
Hi Reid,
Here are two samples of how your cron should look to run hourly:
Attached
You should copy and paste your cron job into the blank boxes - either at the top or to the right - depending on which system your control panel uses.
Brian
Reid Montague
07-02-2009, 08:24 PM
Hi Reid,
Here are two samples of how your cron should look to run hourly:
Attached
You should copy and paste your cron job into the blank boxes - either at the top or to the right - depending on which system your control panel uses.
Brian
Thanks. The second one is in Advanced *Unix Style* and it should just be:
0,*,*,*,* to run hourly?
Thanks
Reid
Brian Collins
07-02-2009, 08:33 PM
Hi Reid,
Yes that is correct assuming your control panel is the same as mine (cPanel).
the 0 signifies exactly on the hour - could be just as easily 20 for 20 past the hour - the * signifies every hour, every day, every month and every week day in that order.
Brian
Donna Walsh
07-03-2009, 01:20 AM
Hi Reid
Mine is set to run every hour but at 20 past the hour.
That is because I have a ton of stuff that uses Cron and did not want
evertyhing running Cron at the same time.
Donna
John Wilson
07-05-2009, 02:20 PM
I use CPanel and put my email address in to be notified when the cron job runs.
I never get the email, so does that mean it isn't running?
Wonder what that cron job does so maybe you could tell if it was really running but I just did not get the email telling me that it did?
John Wilson
Brian Collins
07-05-2009, 02:41 PM
Hi John,
If you do not get an e-mail then there are no issues with the CROn job (which is a good thing).
You can check your raw server logs to confirm that the CRON is actually running.
Brian
John Wilson
07-05-2009, 05:03 PM
This was copied from my CPanel
================================================== ==================
Advanced (Unix Style)This is a web interface to the crontab program. For example, * * * * * would mean every minute and 0 0 * * * would mean at midnight every night.
Please enter an email address where the cron output will be sent:
NOTE: You will receive a message every time this job runs. Using your main e-mail address is not recommended.
================================================== ==================
So it seems unclear to me. Does it send only if there is output from the cron job or does it notify you every time the cron job runs, without regard to output or no output???
I tried to check logs but looked like I had to setup to archive logs which I did. I will check tomorrow to see.
In reading cronjob info looks like */5 means every 5 minutes, */15 means every 15 minutes and just a number in the minute field would indicate the minute that it ran so 5 would run at 5 minutes past the hour and 15 would run at 15 minutes past the hour.
This stuff is so tricky, you wonder how we ever get it all to work.
Thanks,
John Wilson
Christian Nagel
07-07-2009, 05:57 PM
Hi Forum
Using the Advanced (Unix Style) in respect of Cron Jobs when I pasted the cron command I got the following error "/usr/bin/crontab permissions are wrong (6755). Please set to 4755.
How do I change this?
I need some help on this one.
Regards
Chris
Brian Collins
07-07-2009, 07:08 PM
Hi Chris,
I get the same message too (we must be on the same host).
I was told by the help desk of the host to ignore it and my CRON jobs are working just fine.
Brian
Christian Nagel
07-08-2009, 08:50 AM
Hi Brian
Thank you for that information.
Regards
Chris
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.