Page 1 of 1

Configuring Jobs in Crontab to run once every hour

PostPosted: Tue Apr 26, 2016 3:45 pm
by admin
Issue:
I need to configure a job in crontab to run once every hour.

Re: Configuring Jobs in Crontab to run once every hour

PostPosted: Tue Apr 26, 2016 4:09 pm
by admin
Solution:

1. Log in or su as the user you want to modify the crontab jobs.
2. Type :
crontab -e
Press Enter.
3. You will see something like below :

* * * * * some command to be executed
| | | | |
| | | | +++++++++++ This represents the day of the week. Sunday = 0.
| | | ++++++++++++++ This represents the month. Jan=1...Dec=12.
| | +++++++++++++++++ This represents day of the month. 1 - 31.
| ++++++++++++++++++++ This represents hour of the day. 0 - 23.
+++++++++++++++++++++++ This represents minutes. 0 - 59.


4. For the job that you want to modify, change the minutes column to '0':

0 * * * * some command to be executed


SIDE NOTE: If you were requiring this to be running every 3 hours for example, then you can do the following :

0 */3 * * * some command to be executed.

-

PostPosted: Sun Jun 12, 2022 8:03 pm
by RuslanSoulk
die Unvergleichliche Phrase

loveplanet.gq

PostPosted: Sun Dec 04, 2022 7:19 am
by RuslanSoulk