📌 Purpose & Quick Summary

The Cron Jobs automation engine allows you to schedule recurring tasks and background commands on your server. Ideal for triggering Laravel task schedules (php artisan schedule:run), WordPress cron triggers (wp-cron.php), database maintenance scripts, and automated report generators, BoostonCP combines simple scheduling presets with standard 5-field cron syntax and live output logs.

BoostonCP Cron Jobs Management Overview

Figure 19: Cron Jobs management interface showing active automated tasks and live execution logs.


🖥️ Interface Tour & Elements

  1. Deploy New Task Button: Launches the cron job creation modal.
  2. Cron Job Creation Modal:
    • Task Name: Friendly description (e.g. Laravel Scheduler).
    • Preset Intervals Dropdown: Quick presets (Every Minute, Hourly, Twice Daily, Daily at Midnight, Weekly, Monthly).
    • Custom Cron Fields: Individual inputs for Minute, Hour, Day of Month, Month, and Day of Week (* * * * *).
    • Command String: The exact shell command to execute.
  3. Active Jobs Ledger Table: Displays Task Name, Status Toggle, Schedule Frequency, Command, Last Run Timestamp, View Log action, and Delete button.
BoostonCP Add Cron Job Modal

Figure 19.1: Deploy New Task modal showing interval presets and command input.


🛠️ Step-by-Step Instructions

Step 1: Creating a Cron Job

  1. In the sidebar, click Cron Jobs (icon: fa-clock).
  2. Click the DEPLOY NEW TASK button.
  3. In the modal:
    • Task Name: Enter WordPress Cron.
    • Frequency: Select Hourly (or Every 15 minutes).
    • Command: Enter the full command:
      /usr/bin/php /home/user/public_html/wp-cron.php >/dev/null 2>&1
  4. Click Deploy Task. The Linux crontab for your user is updated immediately.

Step 2: Viewing Execution Output Logs

  1. Locate your cron task in the ledger.
  2. Click the View Logs button (document icon).
  3. Inspect the terminal modal to view the exact output and exit status generated during the last run.

⚙️ Complete Field & Parameter Reference Table

Field Syntax Example Description
Minute 0 - 59 */15 Runs every 15 minutes.
Hour 0 - 23 2 Runs at 2:00 AM.
Day of Month 1 - 31 1 Runs on the first day of each month.
Month 1 - 12 * Every month.
Day of Week 0 - 7 (0=Sun) 0 Runs every Sunday.
Mute Output >/dev/null 2>&1 Append to command Discards standard output and prevents inbox spam.

❓ Troubleshooting & Common Errors

1. Command Fails with "PHP: command not found"

  • Cause: Using relative binary paths without specifying the absolute PHP executable.
  • Solution: Always specify the absolute binary path (e.g. /usr/bin/php or /usr/bin/php8.2).