I want to set a cron job that will be with run only by app-engine ui triggering (pressing a button on app-engine)
How can i set the cron.xml to include no scheduling?
<?xml version="1.0" encoding="UTF-8"?>
<description>find buddies to all users</description>
AFAIK this is not possible.
I see 2 possible alternatives, based on a flag controlled by the GUI, indicating if the "cron" job should run or not:
The deferred library has at least one drawback: can't access the request handler inside the deferred function. But the deferred functionality is also available in the Task Queues (mentioned by @jirungaray's answer) - using the optional
eta arguments to taskqueue.add():
countdown -- Time in seconds into the future that this task should run or be leased. Defaults to zero. Do not specify this argument if you specified an eta.
eta -- A
datetime.datetimethat specifies the absolute earliest time at which the task should run. You cannot specify this argument if the countdown argument is specified. This argument can be time zone-aware or time zone-naive, or set to a time in the past. If the argument is set to None, the default value is now. For pull tasks, no worker can lease the task before the time indicated by the eta argument.
This makes task queues preferable to the deferred library.