scheduling cron job

45 views
Skip to first unread message

sende...@yahoo.com

unread,
Nov 22, 2010, 1:35:59 AM11/22/10
to Google App Engine
I can use "every 5 minutes synchronized" to schedule cron job to run
at 05, 10, 15, 20 etc of every hour. How can I schedule cron job to
run at 06, 11, 16, 21 .... (1 minute off) of every hour?

Ian Marshall

unread,
Nov 22, 2010, 3:36:38 PM11/22/10
to Google App Engine
I could be wrong, but in my experience "every 5 minutes synchronized"
means that each scheduled task starts 5 minutes after the previous one
started, and that the first start is at last configuration-upload-to-
GAE time.

You could have your scheduled task run every 5 minutes, and then have
a time detect. If the time is close enough then run your processing
from within your scheduled task, otherwise enqueue a task to run at
exactly the time you want (with a delay of between zero and 5
minutes).

On Nov 22, 6:35 am, "senderj2...@yahoo.com" <senderj2...@yahoo.com>
wrote:

sende...@yahoo.com

unread,
Nov 22, 2010, 7:54:44 PM11/22/10
to Google App Engine
Thanks Ian for the reply. Your words on "every 5 minutes synchronized"
match the ones in google's web site, but not the same as I
experienced. I deploy my app 5-6 times a day for the past month and
the cron job constantly starts and repeats at 05, 10, 15 of the hour.
Nevertheless, this is what I want anyway.

Please help me further by explaining how I can "enqueue a task to run
at
exactly the time you want". I know how to submit jobs to task queues,
but don't know how I can control the timing. Please help.
> > run at 06, 11, 16, 21 .... (1 minute off) of every hour?- Hide quoted text -
>
> - Show quoted text -

风笑雪

unread,
Nov 23, 2010, 1:28:13 AM11/23/10
to google-a...@googlegroups.com
You can run a cron job every minute and check its time, or use task queue and set its eta.

----------
keakon



--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.


Reply all
Reply to author
Forward
0 new messages