meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
cron [2023/06/22 21:10] – [Cron Scripts] johnnycron [2025/12/07 02:41] (current) – [Script purposes] 108.63.126.75
Line 1: Line 1:
 ====== Cron ====== ====== Cron ======
  
-ITFlow comes packaged with several PHP scripts that are intended to be run automatically via CronRunning scripts via Cron ensures that things happen automatically in the background without requiring a logged in user. +ITFlow includes PHP scripts designed to run automatically via [[https://en.wikipedia.org/wiki/Cron|Cron]], ensuring background tasks execute without user interacton. We strongly recommend configuring Cron.
  
-==== Cron Enable & Key ==== 
  
-In order to ensure only Cron executes the scripts (and not some random user/bot navigating to the pages), you must enable cron & generate and provide a Cron Key.+==== Script purposes ==== 
 +All Cron scripts are now in the ''/cron/'' directory. There are several different cron scripts, each with a particular purpose: 
 +  * ''cron.php'' - Daily maintenance tasks (cleanup, auto-closing resolved tickets, alerts, recurring invoices, etc.) 
 +  * ''mail_queue.php'' - Sends e-mails (SMTP) 
 +  * ''ticket_email_parser.php'' - Reads e-mails and creates/updates tickets (IMAP) 
 +  * ''domain_refresher.php'' - Updates domain details (expiryrecords, whois) 
 +  * ''certificate_refresher.php'' - Updates certificate details (expiry, issuer, key)
  
-Login to ITFlow as an admin. Navigate to **Settings** > **Alerts**: +   
-  * Enable cron +==== Crontab file ====
-  * Generate a Cron Key+
  
-==== Cron Scripts ==== +To setup the scheduled tasks, copy the [[https://github.com/itflow-org/itflow-install-script/blob/main/cron.d-itflow|provided cron.d-itflow file]] to your system's cron directory (e.g. ''/etc/cron.d/itflow'').
-The following scripts should be added to your Cron: +
-  * php /full/path/to/**cron.php** **[KEY]** -- Should execute at 2 AM daily: cleanup, alerts, recurring invoices, etc. +
-  * php /full/path/to/**cron_ticket_parse.php** **[KEY]** -- Should execute every min: parses tickets +
-  * php /full/path/to/**cron_mail_queue.php** **[KEY]** -- Should execute every min: Used for emailing within the application+
  
 +//NB: If installed using the automated script after v25.10, this will have been done for you.//
 +
 +
 +==== Cron Activation ====
 +You must then activate Cron within ITFlow:
 +
 +  * Sign in to ITFlow with administrative rights.
 +  * Navigate to **Settings** > **Notifications**
 +  * Enable Cron