java - AppEngine Scheduled Task syntax for a task to run after X years -
i have task needs run every 4 years in application. how can configure in cron.xml. know <schedule>1 of jan</schedule>
run yearly there syntax running after x years <schedule>every 4 years 1 of jan</schedule>
?
-srikanth
the documented schedule format doesn't seem have support desire.
you convert such long intervals in hours , use format instead (might tricky exact dates/times in cases - leap years, etc):
every n hours
i tried number of hours equivalent on 4 years, development server doesn't seem unhappy:
another possible approach (which allows precise date/time specs) invoke task yearly mentioned, keep track inside app of last execution date or number of invocations , execute actual task's job in 1 out of 4 invocations , exiting without doing in other 3 invocations.
Comments
Post a Comment