LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-07-2011, 12:49 PM   #1
ghurty
LQ Newbie
 
Registered: Dec 2010
Posts: 7

Rep: Reputation: 0
Have cron job start running at the half hour?


I know how to set a cron job to run every five minutes starting at the beginning of the hour:
*/7 19-23 * * * /path/to/job.sh

But how would I do it starting at the half hour?

Thanks
 
Old 03-07-2011, 12:54 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693
Could you explain this a bit more? Do you mean, you want to run a command every 5 minutes... starting at 7:30?
 
Old 03-07-2011, 12:55 PM   #3
ghurty
LQ Newbie
 
Registered: Dec 2010
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by szboardstretcher View Post
Could you explain this a bit more? Do you mean, you want to run a command every 5 minutes... starting at 7:30?
Yes, exactly.

Thanks
 
Old 03-07-2011, 12:57 PM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693
interesting.

well,.. I guess this would work.

Code:
30,35,40,45,50,55 19 * * * /path/to/script.sh
*/5 20-23 * * * /path/to/script.sh
Starts 7:30, 7:35 etc.. to 8:00 then every 5 from there on the next line.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running a cron every 7 minutes but to cary over the 7 minute count to the next hour? ghurty Linux - Server 15 10-09-2013 06:45 PM
Cron job issue - every hour works, but specific hour fails lunarleviathan Linux - Newbie 6 11-20-2009 12:19 AM
Running a Cron Job landysaccount Linux - Newbie 6 02-04-2009 05:29 PM
NTP cron job runs every 5 min instead of hour OlRoy Linux - Networking 17 02-28-2008 10:51 AM
cron job to send file via ftp every 1 hour mcalizo Linux - Newbie 1 07-14-2004 03:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration