5 years ago
2 years ago
The cron system allows the system to send and receive emails (and other tasks) in the background. Please ensure this is setup as it is a required task.
There are a number of ways to set this up. The best method is to use a Linux Cron style setup on the server itself. This will be the most reliable method.
Although you can use one of the many free web cron services, these often only work once every 10-15 minutes, meaning that emails take longer to send.
Here is a free service that should work once every 5 minutes: http://www.uptimerobot.com
Note: For some web hosts please remove the quotes from the URL. i.e http://tickets.example.com/cron/ and not "http://tickets.example.com/cron/"
Note: There is no /cron/ folder in the Tickets folder, this is correct. Tickets uses the .htaccess file to handle CRON requests.
- Type crontab -e in your linux command line.
- Type in the following: * * * * * wget -q -O /dev/null "http://tickets.example.com/cron/"
- crontab -l should now list the cron process
If you do not have access to the command line you might have access to the web hosting control panel that should allow this. Otherwise talk with your web host.
Windows Scheduled Task
Windows supports the same type of CRON process through the use of a Scheduled Task and a 3rd party wget program.
- Create a document in notepad with the command: C:\path\to\wget\wget.exe "http://tickets.example.com/cron/"
- Save the file somewhere safe as cron.bat
- Open up windows task scheduler
- Create a new task. Trigger Daily, Repeat Every 5 Minutes (for Duration of 1 Day)
- Action is Start Program and point it to the cron.bat file you create.
- Ensure run whether user is logged in or not is ticked and that you have a valid username/password stored.
cPanel Shared Web hosting
For shared web hosting the Linux Cron details should work. You need to add wget -q -O /dev/null "http://tickets.example.com/cron/" to your cron options from within cPanel.
Certain Web Hosts have limitations, we will update the list below when we see them.
Hostgator has a number of limitations. Where possible we recommend that you use a different provider.
- Their CRON process can only run once every 15 minutes, meaning emails are slow to send and receive.
- Their CRON process is a bit different. The following command must be used: /usr/bin/wget -q -O /dev/null "http://tickets.example.com/cron/"
- Outbound SMTP is often blocked, meaning that the system cannot send emails via an external SMTP host. If you contact them they can unblock this.
Because of these issues we cannot recommend Hostgator. If you have issues running Tickets please ensure that you have contacted Hostgator before logging a ticket with us.
How to check if the CRON is running
- In your web browser go to: http://tickets.example.com/settings/support/
- Press "Reset Cron"
- All cron intervals (e.g Cron every_five_minutes) should now all say "Next Run 0000-00-00 00:00:00"
- Wait up to 10 minutes (during this time do not push "Run Cron Manually" or visit the cron URL)
- The "Next Run" values should all update with a real date and time (if this happens your cron is working).
Applies To: Tickets, MrPassword