Much of Ticketix runs in the background through one scheduled task: scripts/cron.php. Without it, mail is not fetched or sent from the queue, SLA alerts and delayed rules do not run, and scheduled reports and reminders are not sent.
What the scheduled task does
Each run of php scripts/cron.php:
- fetches new mail over IMAP from the main mailbox and from every mailbox added under Setup → Mail → Mailboxes;
- turns fetched mail into tickets and replies;
- sends queued outgoing mail and runs background jobs, including queued AI work such as automatic triage and ticket analysis;
- updates SLA status, sends SLA alerts and runs inactivity and delayed workflow rules;
- runs scheduled reports that are due;
- publishes and archives scheduled Knowledge Base articles;
- writes new and changed articles, community topics and replies into the search index, so the portal search, the ticket form suggestions and Ctrl K find them (from version 2.3.1);
- sends the reminders of staff notes whose reminder date has come, once per note;
- once a week, emails the content gaps of the last seven days to the staff an administrator chose (nothing is sent for a week without gaps);
- checks the quality gate of AI assignment;
- closes tickets that stayed in Pending or Answered for 7 days without an update (
auto_close_daysinconfig.php). The customer receives the Ticket closed email with the rating link; - checks ARN for Ticketix updates every 12 hours; a mandatory update installs itself (from version 2.0.2).
Each run works in batches, so a long backlog is processed over several runs. AI work in the background may take up to 120 seconds per request.
Add the task
Run the script with the PHP command-line interface from the application folder. On most hosts you add it in the control panel (for example Cron Jobs in cPanel) or in the crontab of the site user.
Example crontab entry that runs every 5 minutes:
*/5 * * * * cd /path/to/ticketix && php scripts/cron.php > /dev/null 2>&1
- Replace
/path/to/ticketixwith the application folder. - Use the PHP binary of the PHP version you selected for the site (8.3 or newer). On some hosts this is a full path, for example
/usr/local/bin/php. - Choose an interval that suits your mail volume. Mail and SLA alerts are only as fresh as the last run.
The scripts folder is closed to web access. Run the task from the command line, not as a web address.
Check that it runs
- Run the command once by hand in a terminal on the server:
cd /path/to/ticketix && php scripts/cron.php. - The script prints a JSON summary with
"ok": trueand a result for each step, for exampleimap_fetch,outbound_dispatchandticket_maintenance. - In Ticketix, open Setup → System → Tools, panel Logs, and select the
cronlog. Each run writes a line per step.
If the summary shows "ok": false, the failing step contains the error, for example a wrong IMAP password.
The Mail card on the dashboard shows when the scheduled task last ran, and the Updates screen warns when it has not run for a day (from version 2.0.2).
Note: The scheduled task stops with "Ticketix license activation is required." while the licence is not active. Activate the licence first. See Activate your Ticketix licence.
During updates
An update from the Updates screen needs nothing from you: while Ticketix writes the new files, the scheduled task skips its run. Stop the scheduled task while you update by hand, and turn it back on when the update is finished. See Update Ticketix.