Configuring Jobs in Crontab to run once every hour

Configuring Jobs in Crontab to run once every hour

Postby admin » Tue Apr 26, 2016 3:45 pm

Issue:
I need to configure a job in crontab to run once every hour.
admin
Site Admin
 
Posts: 106
Joined: Mon Jan 18, 2010 11:05 am

Re: Configuring Jobs in Crontab to run once every hour

Postby admin » Tue Apr 26, 2016 4:09 pm

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.
admin
Site Admin
 
Posts: 106
Joined: Mon Jan 18, 2010 11:05 am

-

Postby RuslanSoulk » Sun Jun 12, 2022 8:03 pm

die Unvergleichliche Phrase
RuslanSoulk
 
Posts: 20
Joined: Fri Jan 06, 2017 11:12 pm
Location: https://clck.ru/36Ew74

loveplanet.gq

Postby RuslanSoulk » Sun Dec 04, 2022 7:19 am

RuslanSoulk
 
Posts: 20
Joined: Fri Jan 06, 2017 11:12 pm
Location: https://clck.ru/36Ew74


Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest

cron