Cron Jobs Configuration
Configuring Background Cron Tasks
Section titled “Configuring Background Cron Tasks”FoxDesk uses scheduled background tasks (called cron jobs) to handle things like checking for new emails, running recurring tickets, and keeping the database clean. These run automatically once set up.
Required Scheduled Scripts
Section titled “Required Scheduled Scripts”You need to set up 3 scheduled tasks. If you're on shared hosting with cPanel, use the "Cron Jobs" section in your dashboard. On a VPS, add them to your server's crontab.
1. Fetching Incoming IMAP Logs
Section titled “1. Fetching Incoming IMAP Logs”Checks your support inbox for new emails and turns them into tickets. Runs every 5 minutes. Make sure you've configured the IMAP settings in your config.php first (see Email Configuration).
*/5 * * * * /usr/bin/php /var/www/helpdesk/bin/ingest-emails.php >> /var/log/helpdesk-email.log 2>&12. Processing Recurring Task Workflows
Section titled “2. Processing Recurring Task Workflows”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>&13. Application Maintenance Scrubber
Section titled “3. Application Maintenance Scrubber”Cleans up old temporary files and keeps the database running smoothly. Runs once a day, ideally at 3 AM when nobody's using the system.
0 3 * * * /usr/bin/php /var/www/helpdesk/bin/run-maintenance.php >> /var/log/helpdesk-maintenance.log 2>&1cPanel Specific Paths Warning
Section titled “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.phpNot sure about the exact path? Check with your hosting provider — they can tell you where PHP is installed on their servers.