PiCloud is shutting down. Read the official announcement

Crons

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.

How it Works

Your jobs
Alice's jobs
Bob's jobs
Cores
Standard Queue
Your Cron
Click to Activate Realtime Cores
Your Realtime Queue

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.

How to Use it

Programmatically

			  
			  	# import our Python client
			  	import cloud
			  	
			  	# register a cron that runs every minute
			    cloud.cron.register(ping_webserver, 'heartbeat', '* * * * *')
			  
			

Pricing

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.

Frequently Asked Questions

How do I specify a cron's schedule?

Schedules are specified using a BSD-style cron timestamp. The full format can be found here. The smallest period allowed is once a minute.

Do my scheduled tasks run instantly?

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.

Resources