Cron Jobs Configuration

Set up cron jobs for FoxDesk to automate email fetching, ticket cleanup, and scheduled tasks. Linux crontab configuration guide.

Background tasks

FoxDesk uses background tasks for incoming email, recurring tickets, and maintenance. Authenticated page requests can trigger the built-in fallback, which is enabled by default. System cron is recommended when exact timing matters or the helpdesk receives little interactive traffic.

Choose one scheduler

For the most predictable operation, configure these three tasks. In cPanel, use the Cron Jobs section. On a VPS, add them to the crontab for the account that can read the FoxDesk files.

1. Fetch incoming email

Checks your support inbox for new emails and turns them into tickets. Runs every 5 minutes. Configure and test IMAP in Settings → Email first (see Email Configuration).

*/5 * * * * /usr/bin/php /var/www/helpdesk/bin/ingest-emails.php >> /var/log/helpdesk-email.log 2>&1

2. Process recurring tickets

Creates recurring tickets on the schedule you’ve set up in the admin panel — daily, weekly, or whatever you need. Runs once every hour.

0 * * * * /usr/bin/php /var/www/helpdesk/bin/process-recurring-tasks.php >> /var/log/helpdesk-recurring.log 2>&1

3. Run maintenance

Cleans temporary application files. Run it daily during a quiet period.

0 3 * * * /usr/bin/php /var/www/helpdesk/bin/run-maintenance.php >> /var/log/helpdesk-maintenance.log 2>&1

cPanel Specific Paths Warning

If you’re on shared hosting (cPanel), the path to PHP is usually different. Use something like this instead:

/usr/local/bin/php /home/username/public_html/bin/process-recurring-tasks.php

Not sure about the exact path? Check with your hosting provider — they can tell you where PHP is installed on their servers.

Built-in fallback

If cron is unavailable, keep Settings → System → Background tasks enabled. After normal application use, verify the last-attempt and last-success timestamps shown there. The fallback depends on authenticated requests, so cron remains the better choice for a quiet installation or a busy support mailbox.