Cron events
Every WP-Cron event and custom interval Aimogen Pro registers, what each does, and how to inspect or drive them.
Custom intervals#
Registered through the cron_schedules filter:
| Name | Seconds | Display |
|---|---|---|
minutely | 60 | Once A Minute |
aiomatic_cron_ten | 600 | Aimogen Cron 10 Minute |
aiomatic_cron_sfert | 900 | Aimogen Cron Quarter Hour |
aiomatic_cron_half | 1800 | Aimogen Cron Half Hour |
aiomatic_cron | 3600 | Aimogen Cron |
weekly | 604800 | Once Weekly |
monthly | 2592000 | Once Monthly |
yearly | 31557000 | Once Yearly |
Events#
| Event | Schedule | Purpose |
|---|---|---|
aiomaticaction | aiomatic_cron_sfert, or minutely when the minute switcher is active | The master rule scheduler. Walks every active rule and runs those due |
aiomaticeditaction | The interval in Auto Run Interval | Automatic AI Content Editor runs |
aiomaticactionclear | The interval in Auto Clear Logs | Automatic log clearing |
aiomatic_new_post_cron | Single event | Processes a newly created or updated post. Args: array( $post, true ) |
aiomatic_handle_delayed_post | Single event | Processes a post after the configured Delay Article Editing By (Seconds). Args: array( $post_id ) |
aiomatic_index_single_post | Single event | Adds a post to the embeddings index. Args: array( $post_id ) |
aiomatic_agent_run_single | Single event | Executes one agent step. Args: array( $agent_id, $task ) |
aiomatic_agent_recover | Single event | Recovers a stalled agent. Args: array( $agent_id ) |
aiomatic_agents_watchdog | aiomatic_cron | Every 10 minutes, looks for stuck agents |
aiomatic_expired_post_delete | Single event | Deletes expired generated media |
aiomatic_license_recheck | yearly | Revalidates the licence |
aiomatic_wp_ai_connectors_warm_cache | twicedaily | Warms the Connectors model cache |
Only aiomaticaction and the two clearing events are recurring on a plugin-defined schedule; agent and
post-processing events are single events that reschedule themselves.
Inspecting#
System & Logs › System Info reports whether WP-Cron is disabled and lists the plugin scheduled events with their next run times.
From WP-CLI:
wp cron event list
wp cron event list --fields=hook,next_run_relative,recurrence | grep aiomaticRun one immediately:
wp cron event run aiomaticactionIn PHP:
$next = wp_next_scheduled( 'aiomaticaction' );
echo $next ? gmdate( 'c', $next ) : 'not scheduled';Hooking in#
Every event is an ordinary WordPress action:
add_action( 'aiomaticaction', function () {
error_log( '[Aimogen] rule scheduler fired at ' . current_time( 'mysql' ) );
}, 5 );Use a low priority number to run before the plugin handler, or a high one to run after.
For agent events, the arguments are passed:
add_action( 'aiomatic_agent_run_single', function ( $agent_id, $task ) {
error_log( sprintf( '[Aimogen] agent %d step: %s', $agent_id, $task ) );
}, 5, 2 );Making cron reliable#
WP-Cron only fires on a page load. On a low-traffic site, scheduled work runs late or not at all.
// wp-config.php
define( 'DISABLE_WP_CRON', true );*/5 * * * * curl -s "https://example.com/wp-cron.php?doing_wp_cron" > /dev/null 2>&1For minute-level rule scheduling, run it every minute.
Alternatively, drive rules directly from system cron with WP-CLI and skip WP-Cron entirely:
0 2 * * * cd /var/www/example.com && wp aimogen-run 0 3 >> /var/log/aimogen.log 2>&1Deactivation#
aiomaticaction, aiomaticactionclear and aiomatic_license_recheck are cleared on deactivation, and the
running list is emptied. Agent events are cleared when an agent is cancelled.
Common problems#
An event is not listed. It is only scheduled when its feature is enabled — aiomaticeditaction only
exists when automatic editing is on.
Events are listed but never run. No real cron trigger. See Scheduled tasks do not run.
A rule is due but skipped. A stale entry in the running list. Clear it under System & Logs › Maintenance.
Agents stall between steps. Same root cause: the next single event is scheduled but nothing fires it.
Related#
Still stuck? Open a support ticket and include the diagnostics from Aimogen Pro › System & Logs › System Info.