Cron Manager

The Cron Manager asset
The Cron Manager

The Cron Manager allows you to view and manage all jobs scheduled within the cron process of scheduler for the operating system. For example, if you set up a Future Status job for an asset in your system, the Cron Manager will display the job and will run it at the required date and time. The Cron Manager is located under the System Management Folder in the Asset Map, as highlighted in the figure to the right.

Management of the cron jobs is done on the View Jobs, Options and Running Status screens of the Cron Manager, which are explained in this chapter. For more information on the Logs screen, refer to the Asset Screens manual.

Please note that to run the Cron Manager the following line needs to be placed in the web server administrator's crontab file:

*/15 * * * * php MATRIX_ROOT/core/cron/run.php

Bookmarks to the headings on this page:

  1. View Jobs Screen
  2. Options Screen
  3. Running Status Screen

View Jobs Screen

The View Jobs screen allows you to view the jobs that are scheduled to take place at a future date and time, for example a Future Linking or Future Status job (for more information on how to set up these jobs, refer to the Asset Screens manual). The Scheduled Jobs section of the View Jobs screen is shown in the figure below.

The Scheduled Jobs section of the View Jobs screen of the Cron Manager
The Scheduled Jobs section of the View Jobs screen

The screen is split into three sections – One Off, Every Time and Daily.

  • One Off: this section shows the current jobs that are scheduled to take place at a single point in the future. They will only be run once, at the specified date and time. For each job that is scheduled, the following information is show:   
    • When: this shows the date and time that the job will be run
    • Details: this shows the type of job that will be run and which user scheduled the job.
    • Delete: to delete the scheduled job, click on this box and click Commit. The Cron Manager will no longer run the job.
  • Every Time: this section shows the jobs that are scheduled to take place every time the Cron Manger is run. These jobs include:  
    • Manage Incomplete Submissions Cron Job: this job will send out a reminder email to users who have an incomplete submission for a Custom Form. It will also delete incomplete submissions if users have not completed their forms within the specified time frame. The settings for this cron job are available on the Incomplete Submission Screen of the Form Contents asset in a Custom Form. For more information, refer to the Custom Form manual.
    • Expired Matrix Locks Cron Job: this job will clean up any expired locks in the sq_lock database table of the system, improving the stability and performance of Squiz Matrix.
    • Manage Pending Accounts Cron Job: this job will send out reminder emails to users that have created a user account via an Account Manager but have not yet verified it. It will also delete the users that did not verify their account within the specified time frame. For more information on the Account Manager, refer to the Other CMS Assets manual.  
    • Expired Matrix Cache Cron Job: this job will clean up any expired cache entries in the cache_storage directory of the system, improving the stability and performance of Squiz Matrix.
    • Generate Log Reports Cron Job: this job rotates the system log files every 24 hours. It will also regenerate any reports that read the rotated log files, such as the Search Report (for more information on the Search Report refer to the Search manual).
    • Metadata Triggers Cron Job: this job will fire the Triggers that are listening for the Metadata Time event. These Triggers can then use the Metadata Time condition to compare the time entered into a metadata field against the time of the cron job. If the time entered in the metadata field is before the time on the cron job, the asset will be considered expired and it will perform the Trigger action.
    • Expired Workflow Cron Job: this job will check any approval processes that are currently running and auto escalate it to the next step in the process and send out reminder emails. For more information about Workflow refer to the Schemas manual.
  • Hourly: this section shows the jobs that are scheduled to take place each hour. These jobs include:
    • Remove SOAP Response Files Cron Job: this job runs on an hourly basis and will clear temporary files of SOAP responses stored on the Squiz Matrix server. For more information, refer to the Form Contents chapter of the Custom Form manual.
    • Sync Squiz Suite Products Cron Job: this job runs on an hourly basis and will sync the Squiz Suite products connected with Squiz Matrix. For more information, refer to the Squiz Suite Manager chapter in the Web Services manual. 
  • Daily: this section shows the jobs that are scheduled to take place once a day. These jobs include:  
    • Sync CMIS Bridges Cron Job: this job runs on a daily basis, at midnight (by default), and updates the CMIS repository documents on CMIS Bridge assets. You can change the frequency and time this job runs on its Details screen. For more information, refer to the CMIS Bridge chapter of the SharePoint manual.
    • Update TRIM Record Cron Job: this job runs on a daily basis, at midnight (by default), and updates the TRIM documents on TRIM Saved Search assets. For more information, refer to the TRIM manual.
    • Update Sharepoint Record Cron Job: this job runs on a daily basis, at midnight (by default), and updates the SharePoint documents on Sharepoint Saved Search assets. For more information, refer to the SharePoint manual.
    • Escalate Safe Trash Cron Job: this job runs on a daily basis at midnight (by default), and informs the administrators that there are assets that are marked and waiting to be trashed. If the asset has not been deleted due to its Status, the administrators of that asset are notified. If it has not been deleted due to other assets linking to it, the administrators of those assets will be notified.
  • Weekly: this section shows the jobs that are scheduled to take place once a week. These jobs include:  
    • Funnelback Log Rotation Cron Job: this job runs on a weekly basis, at midnight on Sundays (by default), and archives the search query logs of the Funnelback Manager. For more information, refer to the Funnelback Search manual.
Deleting a Scheduled Job

To delete a job that has been scheduled (for example a Future Status or Future Linking job), go to the View Jobs screen. In the One Off section, click on the Delete box for the job you want to delete and click Commit. The Cron Manager will no longer run the scheduled job. Please note that you cannot delete the default cron jobs, as Squiz Matrix needs these to perform tasks within the system.

Options Screen

The Options screen allows you to configure the Cron Manager including how long between runs, how many times it attempts to run a job and when it is run. Only the Root User can edit the options available on this screen. The Options screen is shown in the figure below.

The Options section of the Options screen of the Cron Manager 
The Options section of the Options screen

The fields that are available on this screen are as follows:

  • Epoch: set the GMT date and time of the first run that Cron Manager made or will make. This is used in conjunction with the setting for Refresh Time to generate the times that the operating system's cron process (or other scheduler) will be initiating a cron run.
  • Refresh Time: set the number hours and minutes between each run of the cron. By default, this is set to 15 minutes, which means that the Cron Manager will be run every 15 minutes. Whenever you change this setting, update the setting for Epoch to the first time that this change will be applied.
  • Warn After Blocked Runs: the Run Check field on the Running Status screen is incremented by one when a blocked run occurs. This happens if a job is still running and the Cron Manager has tried to start a new run. When the Run Check field equals the number specified in this field, a deadlock situation may have occurred and a warning email will be sent to an administration. By default, this number is 3 meaning that the Cron Manager will attempt to re-start itself 3 times before the email is sent.
  • Max Number of Failed Attempts: enter the number of times that a scheduled job can be re-run if it fails. By default, this option is set to 3. Once a job has failed, the Cron Manager will not attempt to run it again.
  • Blackout Periods: this section allows you to specify times that the Cron Manager should not be running, for example during business hours. Enter the from and to times, as well as the days when the Cron Manager should not running. For example, if you do not wish to run the scheduled jobs during business hours you would enter the from time of 9:00, a to time of 17:00 and select Monday through to Friday from the list. To select multiple days, hold down either the Shift or Ctrl keys and click on each day. To add an additional Blackout Periods, tick the Add box and click Commit. An additional row will be added to the Blackout Period section as shown in the figure below.

An additional Blackout Period in the Blackout Periods section
An additional Blackout Period in the Blackout Periods section

  • Log Rotate Time: set a specified time each day for the log files to rotate. This time is set by the hour and is in 24-hour time. By default, this field is set to 01:00.
  • Cron Deadlock Email Receivers: specify the users (in addition to the Root User and those specified in the system's main.inc file) to receive Cron Deadlock email notifications when the Cron Manager may have stalled and cannot run.
     
    To specify a user(s) to receive Cron Deadlock emails, click the Change button and select a user, User Group or Role from the Asset Map or, alternatively, enter the asset ID of the user, User Group or Role and click Commit. To specify additional users, click the More... button. A new field will appear on the screen, where you can select a new user to receive Cron Deadlock emails.

Running Status Screen

The Running Status screen shows information about the status of jobs currently being run by the Cron Manager.

The information that is available on this screen is as follows. Please note that you cannot edit any of this information.

Running Status

This section shows information about the running status of the Cron Manager. The Running Status section of the Running Status screen is shown in the figure below.

The Running Status Section of the Running Status screen of the Cron Manager
The Running Status section of the Running Status screen

The fields that are available on this screen are as follows: 

  • Running: shows whether the Cron Manager is currently running jobs or not.
  • Last Run: shows the date and time of the last time the Cron Manager was run.
  • Run Check: shows the number of times that the Cron Manager attempted to start a run, when the Running field was Yes. If the Cron Manager was still running jobs from the previous run and it tried to start a new run, it would fail and the Run Check would increment by one. This is known as a blocked run.
Dead Lock Status

If the Run Check has reached the figure specified in Warn After Blocked Runs on the Options screen, the Cron Manager could be in a deadlock. This means that there could be a job that is stalled for some reason and the Cron Manager cannot run any more jobs. This section will show the details of any processes that are currently in deadlock. The Dead Lock Status section of the Running Status screen is shown in the figure below.

The Dead Lock Section of the Running Status screen of the Cron Manager
The Dead Lock Status section

PreviousNext