11 years ago

8 years ago

General Troubleshooting

5206

CRON Setup

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.

Linux Cron

  1. Type crontab -e in your linux command line.
  2. Type in the following: * * * * * wget -q -O /dev/null "http://tickets.example.com/cron/"
  3. Save
  4. 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.

[Wget for Windows]

Steps:

  1. Create a document in notepad with the command: C:\path\to\wget\wget.exe "http://tickets.example.com/cron/"
  2. Save the file somewhere safe as cron.bat
  3. Open up windows task scheduler
  4. Create a new task. Trigger Daily, Repeat Every 5 Minutes (for Duration of 1 Day)
  5. Action is Start Program and point it to the cron.bat file you create.
  6. 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

Hostgator has a number of limitations. Where possible we recommend that you use a different provider.

  1. Their CRON process can only run once every 15 minutes, meaning emails are slow to send and receive.
  2. 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/"
  3. 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

  1. In your web browser go to: http://tickets.example.com/settings/support/
  2. Press "Reset Cron"
  3. All cron intervals (e.g Cron every_five_minutes) should now all say "Next Run 0000-00-00 00:00:00"
  4. Wait up to 10 minutes (during this time do not push "Run Cron Manually" or visit the cron URL)
  5. The "Next Run" values should all update with a real date and time (if this happens your cron is working).

Applies To: Tickets, MrPassword