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:

NameSecondsDisplay
minutely60Once A Minute
aiomatic_cron_ten600Aimogen Cron 10 Minute
aiomatic_cron_sfert900Aimogen Cron Quarter Hour
aiomatic_cron_half1800Aimogen Cron Half Hour
aiomatic_cron3600Aimogen Cron
weekly604800Once Weekly
monthly2592000Once Monthly
yearly31557000Once Yearly

Events#

EventSchedulePurpose
aiomaticactionaiomatic_cron_sfert, or minutely when the minute switcher is activeThe master rule scheduler. Walks every active rule and runs those due
aiomaticeditactionThe interval in Auto Run IntervalAutomatic AI Content Editor runs
aiomaticactionclearThe interval in Auto Clear LogsAutomatic log clearing
aiomatic_new_post_cronSingle eventProcesses a newly created or updated post. Args: array( $post, true )
aiomatic_handle_delayed_postSingle eventProcesses a post after the configured Delay Article Editing By (Seconds). Args: array( $post_id )
aiomatic_index_single_postSingle eventAdds a post to the embeddings index. Args: array( $post_id )
aiomatic_agent_run_singleSingle eventExecutes one agent step. Args: array( $agent_id, $task )
aiomatic_agent_recoverSingle eventRecovers a stalled agent. Args: array( $agent_id )
aiomatic_agents_watchdogaiomatic_cronEvery 10 minutes, looks for stuck agents
aiomatic_expired_post_deleteSingle eventDeletes expired generated media
aiomatic_license_recheckyearlyRevalidates the licence
aiomatic_wp_ai_connectors_warm_cachetwicedailyWarms 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:

bash
wp cron event list
wp cron event list --fields=hook,next_run_relative,recurrence | grep aiomatic

Run one immediately:

bash
wp cron event run aiomaticaction

In PHP:

php
$next = wp_next_scheduled( 'aiomaticaction' );
echo $next ? gmdate( 'c', $next ) : 'not scheduled';

Hooking in#

Every event is an ordinary WordPress action:

php
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:

php
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.

php
// wp-config.php
define( 'DISABLE_WP_CRON', true );
bash
*/5 * * * * curl -s "https://example.com/wp-cron.php?doing_wp_cron" > /dev/null 2>&1

For minute-level rule scheduling, run it every minute.

Alternatively, drive rules directly from system cron with WP-CLI and skip WP-Cron entirely:

bash
0 2 * * * cd /var/www/example.com && wp aimogen-run 0 3 >> /var/log/aimogen.log 2>&1

Deactivation#

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.

Still stuck? Open a support ticket and include the diagnostics from Aimogen Pro › System & Logs › System Info.