Skip to main content
Aikeedo has no queue worker. Work that can’t finish inside a request happens in one of three places: the cron tick, a provider webhook, or a batched job driven by cron.

The cron tick

cron.php boots the application, dispatches a single event, and flushes:
Scheduling it is part of installing Aikeedo:
Run it as the same user as the web server. A cron job running as root creates cache and upload files the web server can’t overwrite, which shows up later as a cache that won’t clear.
See Initial setup for the production configuration.

What runs on each tick

Plugins subscribe to the same event. See Events and cron.

Batching and cursors

A tick may arrive every minute, so listeners process a bounded batch and remember where they stopped. Renewal, for example, handles a limited number of workspaces per run and stores its position in an option such as option.cron.renew_subscriptions.cursor_id. That pattern is worth copying:
Process a fixed number of records per run.
Persist a cursor, so the next run continues.
Keep a status, so an administrator can start, pause and stop the work.
Return early when there’s nothing to do, so an idle installation costs nothing.

Import jobs

Imports are the closest thing to a queue: an upload creates a job record, and each tick advances it through the adapter in batches, tracking progress and skipping duplicates. The job carries its own status and counters, so the interface can show progress. See Import adapters.

Provider webhooks

Some work isn’t scheduled at all: it finishes when a third party says so. Video and image generation at several providers is asynchronous, and the provider calls a dedicated endpoint when the result is ready. Payment providers do the same for cancellations and asynchronous settlements. See Payment webhooks.

Timing and reliability

  • Entity changes are flushed after the cron event finishes, the same as in a web request.
  • There’s no retry. A listener that throws stops that listener; the next tick starts fresh. Catch your own exceptions and record failures.
  • Ticks can overlap if one run takes longer than the interval. Keep batches small enough to finish well inside a minute.
  • Nothing is guaranteed to run on time. Some hosts limit cron to every 15 minutes, which delays renewals accordingly.

Checking it works

The admin panel’s status page shows the last recorded run, which is the quickest way to tell whether the schedule is firing at all.