Use crons to schedule tasks to run periodically at specific times and dates.
Crons can be triggered as often as every minute, and there’s no limit to the number of functions you can register as crons.
Everytime your cron is triggered by its schedule, a job is created and added to the queue. This does not mean that your job is processed immediately, as can be seen when Alice or Bob has a job in the queue before your job. If you need your cron job to execute immediately once triggered, you can activate a single realtime core to guarantee that a core is always available.
# import our Python client import cloud # register a cron that runs every minute cloud.cron.register(ping_webserver, 'heartbeat', '* * * * *')
There are no additional charges for using crons. However, you are charged for the compute time and data transfer costs of your scheduled functions at the standard rate found on our pricing page.
Schedules are specified using a BSD-style cron timestamp. The full format can be found here. The smallest period allowed is once a minute.
No. When a cron is triggered, a new task is created and added to the queue. If you have realtime cores available, the task will immediately begin running. Otherwise, it will depend on how long it takes for your job to be assigned to a free core.