Scheduler

From Sit
Jump to: navigation, search

Contents

Scheduler

Administrators can manage the tasks that are scheduled to run periodically within SiT by going to SiT! -> Control Panel -> Scheduler.

Scheduler Requirements

SiT! has a script called auto.php that must run periodically via a crontab on *nix, Scheduled Tasks on Windows or any other method. (e.g. http://www.webcron.org/ or https://www.easycron.com) for the SiT! scheduler to work.

The auto.php script can be run via HTTP or from the console.

An example crontab might look like this:

* * * * * /usr/bin/php -f /var/www/sit/auto.php

Setting up Cron / Crontab for UNIX/Linux systems in detail

  • open a shell if you are not already have one open.
  • make sure you are working as the root user, or web server user, below is a small list on how to get to work as the root user on some systems, if you haven't logged on as the root user directly
    • Ubuntu
      sudo -i
    • FreeBSD
      su -
  • Start the crontab editor
    crontab -e
  • Add the following on a new line
    * * * * * /usr/bin/php -f /var/www/sit/auto.php
    Adjust the paths to fit your system
  • Save and exit

You've now added and installed the cronjob.

Setting up Scheduler for Windows

See How to configure auto.php to run automatically in Windows

Scheduler Settings

Each scheduler action can be individually enabled/disabled or set to run at a frequency that suits you*.

  • Status - Either Enabled or Disabled. An action must be set to 'Enabled' before it will run, if it is set to 'Disabled' it will never run.
  • Start Date - An action will not run before this date.
  • End Date - An action will not run after this date.
  • Type - There are two ways configure how often actions will run, Interval or Frequency
    • Type: Interval - An action will run repeatedly after the interval you specify has elapsed.
      • Interval - An amount of time (in seconds) that should elapse between runs.
    • Type: Frequency - An action will run regularly at a specified time of the month/year.
      • Offset - The number of days since the beginning of the month or year (See Frequency), for example 15 entered here would mean the 15th of the Month, or the 15th day of the year.
      • Time - The time of day to run the action.

*The frequency an action will run is dependent on the frequency that auto.php is executed by cron (or similar). It is not possible to configure scheduled actions to run more frequently than auto.php executes for obvious reasons.

Scheduler Actions

ChaseCustomers

Was intended to automatically chase customers (and their managers) about incidents if we had no response from them, this method was never fully tested and I suspect is currently broken. Advise not to use

CheckIncomingMail

Checks a POP or IMAP mailbox for messages and downloads them. This has no effect if POP or IMAP is not configured, see Inbound Email for more details.

CheckTasksDue

Looks for Tasks that are due and causes the TRIGGER_TASK_DUE trigger to fire.

CheckWaitingEmail

Checks the holding queue for emails and fires the TRIGGER_WAITING_HELD_EMAIL trigger when it finds some.

CloseIncidents

Close incidents that have been marked for closure for longer than the closure_delay parameter (which is in seconds). If no closure delay is set, a default of 554400 seconds (6 days and 10 hours) will be used.

ldapSync

Sync users and contacts with LDAP directory. See ConfiguringLDAP.

PurgeExpiredFTPItems

Purges files which have expired from the FTP site.

PurgeJournal

Delete old journal entries according to the System | Journal config setting Journal Purge Delay

SetUserStatus

(EXPERIMENTAL) This will set users status based on data from their holiday calendar. e.g. Out of Office/Away sick.

TimeCalc

Calculate SLA Target Times and trigger OUT_OF_SLA and OUT_OF_REVIEW system email templates where appropriate.


Troubleshooting scheduler issues

If you have issues with Scheduler actions not running or not behaving as you expect it's useful to turn on debug mode and log errors to a file. See the section on Debug Logging for more information on this. With debug mode on you will see extra information on the scheduler page that will help you troubleshoot any time zone issues you are having.

Personal tools
project