简体   繁体   中英

Linux Cron tab Expression for a job run in different hours

I need to have a single cron tab entry configured for a scheduled job

The job runs at

0-4 hours and then 16-20 hours

I tried this

0 */0-4,9-23 * * * some_report.sh
*/15 0-4,9-23 * * * some_report.sh 

I checked this @ site http://cronchecker.net

but its not the correct entry..

How can i configure the cron expression for this job.

0 0-4,16-20 * * * some_report.sh does exactly what you're asking.

Also try crontab.guru for similar crontab questions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM