Cron Sink
The Cron sink allows you to trigger workflow executions on a schedule using standard cron expressions.
How It Works
Section titled “How It Works”Local Mode
Section titled “Local Mode”When running the desktop app, Flow-Like uses a local scheduler to trigger executions:
┌──────────────┐│ Flow-Like ││ Desktop ││ ┌────────┐ ││ │ Cron │──┼──► Trigger Execution│ │ Sched. │ ││ └────────┘ │└──────────────┘Advantages:
- Works offline
- No server required
- Uses local system time
Limitations:
- Computer must be running
- Missed executions when computer is off
Remote Mode
Section titled “Remote Mode”When deployed to a server, the scheduler runs continuously:
┌──────────────┐│ Flow-Like ││ Server ││ ┌────────┐ ││ │ Cron │──┼──► Trigger Execution│ │ Sched. │ ││ └────────┘ │└──────────────┘Advantages:
- Runs 24/7
- Reliable execution
- No missed schedules
Configuration Options
Section titled “Configuration Options”| Field | Type | Description | Required |
|---|---|---|---|
expression | string | Cron expression | Yes |
timezone | string | Timezone (e.g., America/New_York) | No |
enabled | boolean | Whether the schedule is active | No |
Cron Expression Format
Section titled “Cron Expression Format”Standard 5-field cron format:
┌───────────── minute (0 - 59)│ ┌───────────── hour (0 - 23)│ │ ┌───────────── day of month (1 - 31)│ │ │ ┌───────────── month (1 - 12)│ │ │ │ ┌───────────── day of week (0 - 6) (Sunday = 0)│ │ │ │ ││ │ │ │ │* * * * *Special Characters
Section titled “Special Characters”| Character | Description | Example |
|---|---|---|
* | Any value | * * * * * (every minute) |
, | List | 1,15,30 * * * * (at 1, 15, 30 min) |
- | Range | 1-5 * * * * (minutes 1-5) |
/ | Step | */15 * * * * (every 15 minutes) |
Examples
Section titled “Examples”| Expression | Description |
|---|---|
0 * * * * | Every hour at minute 0 |
0 9 * * * | Every day at 9:00 AM |
0 9 * * 1-5 | Weekdays at 9:00 AM |
*/15 * * * * | Every 15 minutes |
0 0 1 * * | First day of month at midnight |
0 12 * * 0 | Sundays at noon |
30 4 1,15 * * | 1st and 15th at 4:30 AM |
Timezones
Section titled “Timezones”By default, cron expressions use the system timezone (local mode) or server timezone (remote mode). You can override this:
{ "expression": "0 9 * * *", "timezone": "America/New_York"}Common Timezones
Section titled “Common Timezones”UTC- Coordinated Universal TimeAmerica/New_York- Eastern TimeAmerica/Los_Angeles- Pacific TimeEurope/London- British TimeEurope/Berlin- Central European TimeAsia/Tokyo- Japan Standard Time
Payload
Section titled “Payload”Cron triggers receive a payload with execution context:
{ "trigger": "cron", "scheduled_time": "2024-01-15T09:00:00Z", "actual_time": "2024-01-15T09:00:01Z", "expression": "0 9 * * *", "timezone": "UTC"}Missed Executions
Section titled “Missed Executions”Local Mode Behavior
Section titled “Local Mode Behavior”If the computer was off during a scheduled time:
- Default: The execution is skipped
- Execution resumes at the next scheduled time
Remote Mode Behavior
Section titled “Remote Mode Behavior”With proper server infrastructure, missed executions shouldn’t occur. However, if the server was down:
- The execution is skipped
- Consider using persistent job queues for critical schedules
Use Cases
Section titled “Use Cases”Daily Report
Section titled “Daily Report”Generate and send a daily report every morning:
{ "expression": "0 8 * * *", "timezone": "America/New_York"}Hourly Data Sync
Section titled “Hourly Data Sync”Sync data every hour:
{ "expression": "0 * * * *"}Weekly Backup
Section titled “Weekly Backup”Run backup every Sunday at 2 AM:
{ "expression": "0 2 * * 0"}End of Month Processing
Section titled “End of Month Processing”Process on the last day of each month:
{ "expression": "0 23 28-31 * *"}Monitoring
Section titled “Monitoring”Checking Schedule Status
Section titled “Checking Schedule Status”The sink status indicates:
- Whether the schedule is active
- Next scheduled execution time
- Last execution time and result
Execution History
Section titled “Execution History”All cron executions are logged with:
- Scheduled vs actual execution time
- Run ID for tracking
- Execution result
Best Practices
Section titled “Best Practices”- Use specific times when possible - avoid
* * * * *unless truly needed - Consider timezones - be explicit to avoid confusion
- Avoid overlapping - ensure previous run completes before next starts
- Add buffer time - schedule a few minutes after the hour to avoid clock drift issues
- Monitor execution - check that scheduled jobs are running
- Test expressions - verify your cron expression does what you expect
Cron Expression Validators
Section titled “Cron Expression Validators”Test your cron expressions:
- crontab.guru - Simple expression explainer
- cronhub.io/cron-expression-generator - Visual builder
Limitations
Section titled “Limitations”- Minimum interval: 1 minute
- Maximum schedules per event: Depends on hub configuration
- Execution timeout: Follows standard workflow timeout settings