Skip to content

Scheduler (cron) ​

Replora needs one cron line that runs every minute. It decides itself what is due: deleting expired recordings, checking the services and for updates, sending alert digests and reports.

3 minutesSite owners, DevOpsSingle user · SaaS

Add the cron line ​

bash
* * * * * cd /var/www/replora && php artisan schedule:run >> /dev/null 2>&1
  • VPS: add it to the web server user's crontab: sudo crontab -u www-data -e.
  • cPanel: Cron Jobs › Once Per Minute (* * * * *) › command cd /home/USER/replora && php artisan schedule:run >> /dev/null 2>&1. If the command-line php is an older version, use the full path of PHP 8.3 (for example /usr/local/bin/php or /opt/cpanel/ea-php83/root/usr/bin/php).
  • Plesk: Scheduled Tasks › Add Task › Run a command, every minute.
  • Local development: run php artisan schedule:work in a terminal instead of cron.

Run it as the same user as the web server, so the files it writes (logs, cache) stay writable for the site.

What it runs ​

Times are in UTC (the application's time zone).

TaskWhenWhat it does
Scheduler heartbeatevery minuteNotes the time, so the Scheduled tasks check knows cron runs
replora:healthevery 5 minutesRuns every service check of the System page and emails the administrators when a service starts failing or works again
replora:update --checktwice a day (01:00 and 13:00)Asks the release feed for a new version, so the dashboard can show Replora x.y.z is available
recordings:prunedaily at 03:00Deletes recordings older than each website's retention period (the website's choice, capped by the account's plan): first the files, then the rows
replora:geoipweekly, Tuesday 04:00Downloads fresh visitor-location databases (MaxMind, DB-IP) for the providers that are switched on
alerts:digestevery minuteSends the alert matches held back by an alert's cooldown once it is over
funnels:regressionsdaily at 07:00Emails account managers when a funnel converts worse than the week before
summaries:digestshourlyWrites the AI site summaries that are due (with an Anthropic API key)
plans:trial-reminders (SaaS)daily at 09:00Emails account managers whose free trial ends in the next few days
tickets:remind (SaaS)every 5 minutesReminds the support team of tickets due soon or overdue
tickets:auto-close (SaaS)hourlyCloses answered tickets without a reply from the customer for a while
affiliates:payouts-due (SaaS)monthly, on the 1st at 09:00Emails administrators the affiliates that are ready to be paid

Each task is registered by the module that owns it, so removing a module removes its task. Tasks never overlap with a previous run that is still busy, and on several servers the module tasks run on one server only (this needs a shared cache such as Redis; see Scaling).

See the list with its next run times at any time:

bash
php artisan schedule:list

Is it working? ​

Administration › System › Service status › Scheduled tasks:

StatusMessage
WorkingRan 12 seconds ago.
Needs attentionScheduled tasks have never run: add the cron entry “* * * * * php artisan schedule:run”.
FailingLast ran 25 minutes ago: check the cron entry “* * * * * php artisan schedule:run”. (shown when the last run is more than three minutes ago)

To test the line by hand, run the command as the cron user and look for errors:

bash
sudo -u www-data php /var/www/replora/artisan schedule:run

Without cron

Replora keeps recording, but expired recordings are never deleted (the disk fills up), the service checks and update checks stop, and digests, reminders and payout emails are not sent.

The scheduler doesn't process recordings: that is the background worker. On shared hosting without long-running processes, a second cron line runs the worker.

Replora: see what your visitors see.