CRON jobs to set the ticket system offline

Akeeba Ticket System 5 no longer has the Off–line Schedule feature which allowed to you to put the ticket system off–line (disallow new tickets and new ticket replies) on a schedule.

Instead, we provide integration with Joomla's command–line application, cli/joomla.php, and a command which allows you to change the component Options.

You can schedule the execution of these commands using CRON jobs. CRON jobs can be defined using your host's tools, typically cPanel or Plesk.

You will need to know two things before you start (if unsure, ask your host about these):

  1. The absolute filesystem path to your site's root. For the purpose of this section we assume it is /home/mysite/public_html.

  2. The absolute filesystem path to the PHP CLI binary. This is entirely host specific. Make sure to ask your host about the same PHP version you are using on the site itself — most hosts provide a wide choice of PHP versions at the same time. For the purpose of this section we assume it is /usr/local/bin/php.

To put the ticket system off–line you need to execute two commands. One to set No New Tickets (prevents submitting new tickets) and one to set No New Replies (prevents submitting new replies):

/usr/local/bin/php /home/mysite/public_html/cli/joomla.php ats:config \
  -k nonewtickets -a 1

/usr/local/bin/php /home/mysite/public_html/cli/joomla.php ats:config \
  -k noreplies -a 1

To put the ticket system on–line you need to execute two commands. One to disable No New Tickets (allowing the submission of new tickets) and one to disable No New Replies (allowing the submission of new replies):

/usr/local/bin/php /home/mysite/public_html/cli/joomla.php ats:config \
  -k nonewtickets -a 0

/usr/local/bin/php /home/mysite/public_html/cli/joomla.php ats:config \
  -k noreplies -a 0