Skip to content

Scheduled work (cron) ​

Qorekit has work to do without anyone asking: running background jobs, removing uploads that nobody saved, cleaning up after updates. A cron job that runs Qorekit every minute does this on time.

The command ​

Administration › System shows the exact command for your installation, ready to copy. It looks like this:

bash
cd '/home/user/domains/crm.example.com/public_html' && /usr/local/bin/php artisan schedule:run >> /dev/null 2>&1

Enter it as it is, with nothing before it.

Adding it in your hosting panel ​

Set every time field to *, which means every minute.

DirectAdmin : Advanced Features › Cron Jobs (or Scheduled tasks). Put * in Minute, Hour, Day of Month, Month and Day of Week, paste the command, and choose Create.

cPanel : Advanced › Cron Jobs. Under Common Settings, choose Once Per Minute, paste the command, and choose Add New Cron Job.

Plesk : Websites & Domains › Scheduled Tasks › Add Task. Choose Run a command, paste the command, and set Run to Cron style with * * * * *.

A server of your own : Add the line to the crontab of the user the site runs as, with crontab -e:

* * * * * cd /path/to/qorekit && php artisan schedule:run >> /dev/null 2>&1

Within a minute or two, the System page should say that a cron job runs Qorekit.

If it does not run ​

  • The wrong PHP. The command must start PHP 8.3 or newer. If scheduled work still has not run after a few minutes, replace the PHP part of the command (after &&) with the path your host gives for PHP 8.3, such as /usr/local/php83/bin/php or /opt/cpanel/ea-php83/root/usr/bin/php. Your hosting provider's help pages or support can tell you.
  • Every 15 minutes only. Some hosts run cron less often than asked. Qorekit notices and adapts: scheduled work then also runs while people use the site.

Without cron ​

Without a cron job, Qorekit runs scheduled work after page requests instead, at most once a minute. It works, but the work waits while nobody uses the site. A working cron job makes this step aside on its own.

To turn it off, for example where a deployment has its own scheduler, set QOREKIT_WEB_CRON=false in .env (see configuration).

Qorekit is free software under the GNU GPL, version 3 or later.