Skip to content

Website CronJobs ​

Overview ​

The website's CronJob page runs a command on a schedule for that website only, for example the Laravel scheduler every minute or WordPress WP-Cron every 5 minutes.

Unlike server CronJobs, you do not pick a user or a directory:

  • The command always runs as the website's owner (for example flashpanel).
  • The command starts in the website's directory (for example /home/flashpanel/example.com), so relative paths such as php artisan schedule:run work.
  • When you change the owner or rename the website, FlashPanel reinstalls its CronJobs for the new user and directory.

Create a CronJob ​

  1. Open the website and click CronJob in the menu.
  2. Click Create CronJob.
  3. Enter the command in the editor. The User field shows the website's user and cannot be changed.
  4. Fill in Description (optional, up to 100 characters).
  5. Set the schedule the same way as for server CronJobs.
  6. Click Create CronJob.

Manage CronJobs ​

The table and the Run, View Log, Edit CronJob and delete buttons work the same as on the server CronJob page.

Notes ​

  • Note: Website CronJobs also appear on the server's CronJob page, with a Site column. Click the website name to open its CronJob page.
  • Note: Deleting the website also deletes its CronJobs.
  • An alias website shares the main website's directory, so it has no CronJob menu; create the CronJob on the main website.