Tikejhya: Ashish Nepal

Knowledgebase

Tag: cron

cronjob offset

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

How to setup cronjob with offset:

# This cron will execute every fifth minute.
1-59/5 * * * * echo "hello i am offsetting 1"
# This cron will execute every fifth minute which starts with 2nd minute hence, it would offset by 1 minute compared to above.
2-59/5 * * * * echo "hello i am offsetting 2"
# This cron will execute every fifth minute which starts with 3rd minute hence, it would offset by 2 minute compared to above.
3-59/5 * * * * echo "hello i am offsetting 3"

This can also be done using sleep 60; sleep 120; sleep 180;

Cronjob (example)

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

Every odd minute would be:
1-59/2 * * * *

Every even minute would be:
0-58/2 * * * *

Powered by WordPress & Theme by Anders Norén