Cronjobs

xcensus

Verified User
Joined
Sep 4, 2003
Messages
52
Hi,

I have setup a cronjob correctly within the DA user panel, it is supposed to run every 1 minute, but is only working every hour, why is this ?
 
Probably because you've got the fields confused.

The first field is for minutes, the second for hours.

To run a job every hour the first two fields should be:

x *

where "x" should be replaced by the exact minute you want it to run at. For example:

3 *

will run three minutes after every hour.

If you want it to run every minute, then the first two fields should be

* *

so the cron job will run every minute of every hour.

Jeff
 
Hi Jeff,

If I wanted to run a script every 4 hours let's say...

Would I then leave the first field as *

and the second field as 4 ?

Thanks,
Jo



jlasman said:
Probably because you've got the fields confused.

The first field is for minutes, the second for hours.

To run a job every hour the first two fields should be:

x *

where "x" should be replaced by the exact minute you want it to run at. For example:

3 *

will run three minutes after every hour.

If you want it to run every minute, then the first two fields should be

* *

so the cron job will run every minute of every hour.

Jeff
 
Gotcha...

So what exactly would be the outcome if you created :

* 4 * * * (or 4 in the hours place)

Thanks,
Jo

ballyn said:
If you wanted to run at 10 minutes after the hour every 4 hours:

10 */4 * * *
 
Back
Top