Search code examples
jenkinscroncron-task

Crone to be executed every 40 minutes and 3 hours


i am looking to execute a crone job in Linux. it should run every 3 hour and 40 minutes.

I have tried */40 */3 * * * command, I am not getting this properly executed.

thanks in advance .


Solution

  • cron is time based, not interval based, and the interval 3 hour 40 minutes i.e. 220 minutes is not a factor of the number of minutes in a day i.e. 24x60=1440, so the event is not a recurring event. so there is no way to use cron. if the interval is a factor of 1440, it's possible to use cron, you may refer to How to do a cron job every 72 minutes