Reputation: 190
Are there any risks/cautions around creating tasks for a GAE Push Task Queue in say 1 month from now or even 1 year from now?
Upvotes: 1
Views: 714
Reputation: 41089
According to the documentation the maximum ETA for a task is 30 days.
The biggest risk for long-in-the-future tasks is that when this future finally arrives, you may no longer need this task. For example, a customer can close his account or you can release a new version of your software that is not compatible with the scheduled task. In fact, I cannot think of a use case where nothing can go wrong when a task is scheduled for 1 year into the future.
A better approach is to create entities that represent your events, and then have a cron job that checks once a day (or once a week) which entities are coming "due" in the next period and schedules tasks for them. This way you have only one day/week worth of scheduled tasks to deal with if you make changes in the code. It is also easy to delete these entities if a customer cancels an action or closes an account, for example.
Upvotes: 3