Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

setup cron from morning to evening only [closed]

I have to run daily cron.

Cron must running time will be morning 11 AM to evening 7 PM.

In this given time cron must run at every 15 mins daily.

same thing after in night cron must run at every hour?

Is this possible with linux cron scheduling type.

Or i have to manage this from any scripting language.

like image 866
PHP Connect Avatar asked Oct 30 '12 10:10

PHP Connect


1 Answers

*/15 11-18 * * * statement/to/run
0 0-10,19-23 * * * statement/to/run

Should do what you need.

*/15 or 0,15,30,45 will both do the same thing and run every 15 minutes.

You'll need to break it into two entries since you want it to run differently during different times of day.

like image 126
Omnikrys Avatar answered Nov 07 '22 06:11

Omnikrys