Available scheduling intervals for Data Machine flow automation using WordPress Action Scheduler.
Data Machine uses WordPress Action Scheduler for recurring flow execution. Scheduling is handled through the Flows API with the scheduling_config parameter, supporting standard WordPress intervals plus custom intervals for workflow automation.
These intervals are available by default in the Data Machine core plugin.
'interval' => 'every_5_minutes'- Frequency: Every 5 minutes
- Seconds: 300
- Use Case: Real-time monitoring, high-frequency data ingestion.
'interval' => 'hourly'- Frequency: Every hour
- Seconds: 3600
- Use Case: High-frequency content processing, social media updates.
'interval' => 'every_2_hours'- Frequency: Every 2 hours
- Seconds: 7200
- Use Case: Frequent processing without hourly overhead.
'interval' => 'every_4_hours'- Frequency: Every 4 hours
- Seconds: 14400
- Use Case: Periodic updates, moderate frequency.
'interval' => 'qtrdaily'- Frequency: Every 6 hours
- Seconds: 21600
- Use Case: Business-hour processing, multi-day cycles.
'interval' => 'twicedaily'- Frequency: Every 12 hours
- Seconds: 43200
- Use Case: Semi-daily processing, moderate frequency updates.
'interval' => 'daily'- Frequency: Every 24 hours
- Seconds: 86400
- Use Case: Daily content aggregation, blog post scheduling.
'interval' => 'weekly'- Frequency: Every 7 days
- Seconds: 604800
- Use Case: Weekly reports, content roundups, maintenance tasks.
{ "interval": "manual" }- Behavior: No automatic execution. The flow must be triggered via the
run_flowtool or the Execute API.
{
"interval": "one_time",
"timestamp": 1735689600
}- Behavior: Executes once at the specified Unix timestamp.
- Requirement: A valid future Unix timestamp must be provided in the
timestampfield.
# Schedule flow to run daily
curl -X POST https://example.com/wp-json/datamachine/v1/flows \
-H "Content-Type: application/json" \
-u username:application_password \
-d '{
"pipeline_id": 123,
"flow_name": "Daily Flow",
"scheduling_config": {"interval": "daily"}
}'
# Schedule flow to run every 5 minutes
curl -X POST https://example.com/wp-json/datamachine/v1/flows \
-H "Content-Type: application/json" \
-u username:application_password \
-d '{
"pipeline_id": 123,
"flow_name": "Rapid Processing",
"scheduling_config": {"interval": "every_5_minutes"}
}'Developers can register additional intervals using the datamachine_scheduler_intervals filter:
add_filter('datamachine_scheduler_intervals', function($intervals) {
$intervals['every_3_days'] = [
'label' => 'Every 3 Days',
'seconds' => DAY_IN_SECONDS * 3,
];
return $intervals;
});- Best For: Social media posting, news monitoring, real-time data processing
- Considerations: Higher server load, API rate limits
- Examples: Twitter feeds, breaking news alerts, live data updates
- Best For: Content aggregation, blog posting, regular data processing
- Considerations: Balanced server load, sufficient content accumulation
- Examples: RSS feed processing, email newsletters, content curation
- Best For: Reports, archives, maintenance tasks, bulk processing
- Considerations: Lower server impact, content batching opportunities
- Examples: Weekly reports, content audits, archive processing, cleanup tasks
- Higher frequency intervals (like
every_5_minutes) increase server resource usage - Consider content volume and processing complexity
- Monitor job execution times and system performance
- External APIs (Twitter, Facebook, etc.) have rate limits
- Schedule intervals should respect API limitations
- Build in buffer time for API failures
Action Scheduler automatically handles missed schedules:
- Backlog Processing: Runs missed executions on the next WordPress cron
- Failure Recovery: Failed jobs are logged; the next execution follows the scheduled interval
- Overlap Prevention: Prevents multiple concurrent executions of the same flow
# Check current schedule status
curl -X GET https://example.com/wp-json/datamachine/v1/flows/123 \
-u username:application_passwordResponse includes scheduling_config with current settings and historical execution data.
- Flows API - Flow management and configuration
- Execute API - Immediate flow execution
- Jobs API - Job monitoring and execution history