Ticket Redirect Addon - Cron Setup Instructions =============================================== This module uses a cron job that must run every 15 minutes to control ticket access expiration times. Without this cron, users may continue seeing the countdown after it should have expired. This cron ensures redirect durations are respected correctly. ──────────────────────────────────────────── SETUP OPTION 1 – CPANEL METHOD (RECOMMENDED) ──────────────────────────────────────────── 1. Log in to WHMCS Admin 2. Go to: System Settings > Automation Settings 3. In the top left corner, click: **View Cron Status** 4. Copy the path shown for PHP. It will look like: /opt/cpanel/ea-php82/root/usr/bin/php -q /home/youruser/public_html/crons/cron.php 5. Replace the **/crons/cron.php** part with: /modules/addons/TicketRedirect/TicketRedirect_cron.php 6. Your final cron command should look like: */15 * * * * /opt/cpanel/ea-php82/root/usr/bin/php -q /home/youruser/public_html/modules/addons/TicketRedirect/TicketRedirect_cron.php 7. In cPanel, go to: **Cron Jobs** 8. Create a new cron job with the following schedule: Minute: */15 Hour: * Day: * Month: * Weekday: * 9. Paste the final cron command into the command field and save. (Optional) To store the output in a log file, you can add this to the end: >> /home/youruser/cron_logs/ticketredirect.log 2>&1 ─────────────────────────────── SETUP OPTION 2 – SSH TERMINAL ─────────────────────────────── If you have terminal or SSH access, you can manually add the cron using crontab. 1. Open SSH and run: crontab -e 2. Add the following line (adjust the PHP path and username accordingly): */15 * * * * /opt/cpanel/ea-php82/root/usr/bin/php -q /home/youruser/public_html/modules/addons/TicketRedirect/TicketRedirect_cron.php 3. Save and exit. (Optional) To log the output: */15 * * * * /opt/cpanel/ea-php82/root/usr/bin/php -q /home/youruser/public_html/modules/addons/TicketRedirect/TicketRedirect_cron.php >> /home/youruser/cron_logs/ticketredirect.log 2>&1 ──────────────────────── IMPORTANT NOTES ──────────────────────── - The PHP path depends on your hosting setup. Always use the one shown under "View Cron Status" in WHMCS. - Make sure the file `TicketRedirect_cron.php` exists inside your module folder. - This cron must run every 15 minutes. - Permanent redirects are not affected by the timer. - The module does not automatically create the cron for you. You must set it up using cPanel or SSH. Author: Adoon King Version: 2.1