On 11/06/2009 02:42 PM, Goh Yong Kwang wrote:
--
Regards,
Junhao> I saw an example at
http://www.marksanborn.net/linux/learning-cron-by-example/ for a cron
job as follows:
It explains:
Using the ‘/’ allows us to divide the day into chunks.
Here, the tasks is executed every 4 hours (24/6 =4).
59 */6 * * * /home/username/backupsite
I wonder if the explanation is correct after looking around. In this example,
the cron job will be run at:
12:59am, 4:59am, 8:59am, 12:59pm, 4:59pm and 8:59pm
But my interpretation is that it is run every 6 hours (step/interval) instead:
12:59am, 6:59am, 12:59pm and 6:59pm
Am I wrong (or right)? How do we interpret the step?
Goh, Yong Kwang
Singapore
If a 24hour day is divided by 6, each interval is 4hours.
00:59am + 4 hours = 4:59am
04:59am + 4 hours = 8:59am ...
The number after the '/' is not a step indicator. It is really integer
division. Expanded as
TIME_INTERVAL=${Num_of_time_units}/${X},
where X is the number you put after the '/',
and ${Num_of_time_units} is the number of units for that column,
i.e. 24 for hours, 60 for mins, 60 for secs, etc
Regards,
Junhao
_______________________________________________
LUGS Mailing list - [email protected]
List FAQ: http://wiki.lugs.org.sg/LugsMailingListFaq
Info page: http://www.lugs.org.sg/mailman/listinfo/slugnet
To unsubscribe send an empty email to: [email protected]