Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A simple CRON question 1

Status
Not open for further replies.

webdev007

Programmer
Sep 9, 2005
168
I need to run a PHP script every day, once every 3 hours
before doing it wrong I would like verifying if I my syntax is fine:
* 3,6,9,12,15,18,21,24 * * * wget ..etc...php
Are the hours set correctly
It works fine when I test it every 5 minutes but before running further tests I would like to know if my syntax is ok
Thanks
Regards.
 
I think you can shorten it to * */3 * * * wget ..etc...php.

--== Anything can go wrong. It's just a matter of how far wrong it will go till people think its right. ==--
 
Should have double checked my post first. You should really specify a value for minutes (the first *) else your script will be triggered every minutes (somebody correct me if I'm wrong). So your should have something like 0 */3 * * * wget ..etc...php

--== Anything can go wrong. It's just a matter of how far wrong it will go till people think its right. ==--
 
Thanks again I fired my "thanks" before your second message
 
For those without the */3 functionality (some older variations of *nix), you would probably need to specify midnight as 00 rather than 24.

I want to be good, is that not enough?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top