Complex time schedule for cron job in AppEngine(Java)
I need a cron job 开发者_运维问答to run on every 15 mins in every weekday just from 8:00 to 16:00.
How to set the Schedule Format for this cron job?
The simplest approach: set it to run every 15 minutes anyway, and then at the very start of your application code just bail out immediately and innocuously if it's not a weekday or the time is too early or late. This will serve you particularly well if and when further complications are involved (this schedule looks suspiciously like "working hours" so it can't be long before somebody asks you to avoid running on Christmas and the like;-).
Take a look at this link which describes how to create a cron expression http://www.quartz-scheduler.org/docs/tutorials/crontrigger.html
It should be something like this for your case 0 0/15 08-16 * * MON-FRI (Not validated)
精彩评论