You can use Task Queues, as described here. Task queues have the same duration constraint of Cron Jobs (10 minutes), and you can specify the time at which the Task will be executed with the countdownMillis
method on the TaskOptions
object. For example:
Queue myQueue = QueueFactory.getQueue("myQueue");
myQueue.add(TaskOptions.Builder.withUrl("/myTask").countdownMillis(2000));
will delay the execution of the task at URL /myTask
on the queue myQueue
by 2 seconds. Have a look here to understand how to properly configure a task queue for your needs.