I\'m using Google App Engine and I want like to be able to schedule jobs based users\' parameters.
I know this can be done with cron jobs, but looks like it does not
You may want to star Issue 3638: Cron jobs to be scheduled programatically
Meanwhile you can write your own implementation: have a generic cron job running periodically (every 1 minute being the finest resolution) and inside that cron job check user-programmed scheduling data persisted somewhere (in the datastore for example) and, if needed, trigger execution of whatever is needed to be executed, either inlined or by enqueueing a task in some task queue.
It's possible to drive the scheduling resolution even under 1 minute, if needed, see High frequency data refresh with Google App Engine
For my debts tracking app DebtsTracker.io I've implemented it manually.
When a user creates a debt record he can specify due date that is stored in an unindexed DueDate
and indexed ReminderDateTime
fields.
I have a cron that query records with ReminderDateTime < today
and sends notifications. Once notification sent the ReminderDateTime
is set to null or far future so it's not picked in next cron run. If user hits Remind me again
I am updating the ReminderDateTime
to some date in future (user decides when).
If ReminderDateTime
is closer then cron interval then I simply create I put a task to queue with appropriate delay.
This works very well and is very cheap to run.