Scheduler API
Headless Client Plugin Guide / Scheduler API
Last updated
Was this helpful?
Headless Client Plugin Guide / Scheduler API
Last updated
Was this helpful?
The Scheduler API provides functionality for scheduling tasks to be executed at specified times or intervals. This is useful for automating recurring tasks like backups, data syncs, or periodic cleanups. The tasks are still subject to Servoy’s single-threaded nature, so any running method will block other tasks from executing.
You can find more detailed information about Scheduler API .
Time-Based Execution: Methods can be scheduled to run at a specific time or at regular intervals.
CRON Expressions: The Scheduler API supports CRON expressions for highly flexible task scheduling.
Job Management: Jobs can be created, listed, and removed as needed.
Here is an example for adding job / scheduling a simple task:
The example will alternate between Ping and Pong every 1 second, for 10 times.
Here are a few CRON timings generator websites:
Here is an example for adding job with repeating interval using method:
In Servoy, a CRON job is a scheduled task that runs at specified times or intervals using the . CRON jobs in Servoy allow you to automate server-side tasks based on time expressions called CRON expressions. These jobs are useful for recurring tasks such as data synchronization, backups, report generation, and other maintenance tasks that need to run periodically without user intervention.
Here is an example for adding a CRON job that runs every hour, using :
Here is an example for adding a CRON job that runs every Monday, using method:
Here is an example for listing and removing scheduled jobs using and method: