Whizan Cloud ServicesDocumentation Hub
Documentation/Developer Tools/Scheduled Cron Jobs

Scheduled Cron Jobs

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

  1. 1Navigate to 'Cron Jobs' from the developer tools sidebar.
  2. 2Click '+ Create Cron Job'.
  3. 3Enter a name and specify your cron schedule expression (e.g. '0 0 * * *' for daily midnight).
  4. 4Select your target type: trigger an Edge Function, send an HTTP request to a Microservice, or execute a container CLI command.
  5. 5Choose your misfire policy (SKIP or FIRE_LATEST_ONCE).
  6. 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-cache
Or 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 midnight

Configuration Reference

Parameter / SettingDescriptionDefault / Recommended
Cron ExpressionStandard 5-part cron syntax schedule0 0 * * *
Target PipelineExecution target: FUNCTION, SERVICE, WEBHOOK, or CONTAINER_EXECFUNCTION
Misfire PolicyBehavior if schedule was overdue: SKIP (ignore missed runs) or FIRE_LATEST_ONCESKIP
TimeoutMaximum execution duration allowed before job is cancelled60 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.