Scheduled Cron Jobs
Event-driven recurring schedules that trigger edge functions, invoke service endpoints, or execute maintenance CLI commands.
Supported:Standard 5-field Cron SyntaxEdge Function TargetsHTTP WebhooksContainer Exec
When to Use This Service
Ideal Use Cases
- Nightly data rollups, metric aggregations, and financial report generation
- Periodic synchronization with external third-party APIs (every 15 minutes, hourly, daily)
- Database maintenance tasks, session purging, and temporary file cleanups
- Automated subscription renewal checks and notification dispatching
When to Choose Another Workload
- Continuous real-time stream processing (use Backend Microservices worker mode instead)
- Unpredictable user-triggered asynchronous tasks (use Whizan Flow or message queues instead)
How to Use & Deploy
Option 1Deploy via Web Console
- 1Navigate to 'Cron Jobs' from the developer tools sidebar.
- 2Click '+ Create Cron Job'.
- 3Enter a name and specify your cron schedule expression (e.g. '0 0 * * *' for daily midnight).
- 4Select your target type: trigger an Edge Function, send an HTTP request to a Microservice, or execute a container CLI command.
- 5Choose your misfire policy (SKIP or FIRE_LATEST_ONCE).
- 6Click 'Create Job'. The scheduler activates immediately.
Option 2Deploy via CLI & Terminal
Deploy instantly from your local workspace terminal using the global Whizan CLI:
$ whizan cron create --schedule '0 */4 * * *' --target-function clean-cacheOr prompt your AI Coding Assistant (Cursor / Antigravity MCP):
“Create a scheduled cron job to run nightly database maintenance”
Practical Project Example
cron-expressions.txt
# Standard 5-Field Cron Expression Reference:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12)
# │ │ │ │ ┌───────────── day of week (0 - 6) (Sunday to Saturday)
# │ │ │ │ │
*/15 * * * * -> Run every 15 minutes
0 * * * * -> Run at the start of every hour
0 0 * * * -> Run once a day at midnight (UTC)
0 9 * * 1-5 -> Run at 9:00 AM on weekdays (Monday to Friday)
0 0 1 * * -> Run on the 1st of every month at midnightConfiguration Reference
| Parameter / Setting | Description | Default / Recommended |
|---|---|---|
| Cron Expression | Standard 5-part cron syntax schedule | 0 0 * * * |
| Target Pipeline | Execution target: FUNCTION, SERVICE, WEBHOOK, or CONTAINER_EXEC | FUNCTION |
| Misfire Policy | Behavior if schedule was overdue: SKIP (ignore missed runs) or FIRE_LATEST_ONCE | SKIP |
| Timeout | Maximum execution duration allowed before job is cancelled | 60 seconds |
Best Practices & Pro Tips
Tip 1Use 'SKIP' misfire policy for high-frequency crons (e.g. every 5 minutes) to avoid request storms.
Tip 2Use 'FIRE_LATEST_ONCE' for daily business rollups or backup jobs to guarantee execution even after maintenance windows.
Tip 3Check the live execution run history to inspect execution logs, exit codes, and response payloads.
