Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Cron Expression for running job every 4 hours starting at 4pm . But should not run between 12am to 7am of the day

I am trying to create a Cron Expression for running job every 4 hours starting at 4pm, but should not run between 12am to 7am of the day.
So far I tried to do this but it does not work.

0 0 16/4 ? 0-2,7-23 * * *

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

This could be your cron expression.

0 0 16/4,20,8,12 ? * * *

Use this link to get exactly what you are seeking for. It will also helps you with the next execution time.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading