Scheduled Jobs Manager
Last Updated: 17 Apr 2017
The Scheduled Jobs Manager allows you to view and manage all jobs scheduled for the operating system. For example, if you set up a Future Status job for an asset in your system, the Scheduled Jobs Manager will display the job and will run it at the required date and time.
The Scheduled Jobs Manager is located under the System Management Folder in the Asset Map.
Management of scheduled jobs is done on the View Jobs, Options and Running Status screens, which are explained in this chapter.
Please note that to run the Scheduled Jobs Manager the following line needs to be placed in the web server administrator's crontab file:
*/15 * * * * php MATRIX_ROOT/core/cron/run.php
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 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 Scheduled Jobs Manager will no longer run the job.
- Every Time: this section shows the jobs that are scheduled to take place every time the Scheduled Jobs Manger is run. These jobs include:
- Manage Incomplete Submissions Scheduled 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 scheduled 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 Scheduled 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 Scheduled 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 Scheduled 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 Scheduled 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 Scheduled 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 scheduled job. If the time entered in the metadata field is before the time on the scheduled job, the asset will be considered expired and it will perform the Trigger action.
- Expired Workflow Scheduled 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 Scheduled 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 Scheduled 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 Scheduled 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 Scheduled 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 Scheduled 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 Scheduled 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.
- Generate Google Analytics Report Scheduled Job: this job runs on a daily basis at 4am (by default), and generates the Google Analytics report data for your assets. This data can be viewed on the Analytics screen in Edit+ for Squiz Matrix.
- Weekly: this section shows the jobs that are scheduled to take place once a week.
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 Scheduled Jobs Manager will no longer run the scheduled job. Please note that you cannot delete the default scheduled jobs, as Squiz Matrix needs these to perform tasks within the system.
The Options screen allows you to configure the Scheduled Jobs 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 fields that are available on this screen are as follows:
- Epoch: set the GMT date and time of the first run that Scheduled Jobs 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 scheduled jobs process (or other scheduler) will be initiating a job run.
- Refresh Time: set the number hours and minutes between each scheduled jobs run. By default, this is set to 15 minutes, which means that the Scheduled Jobs 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.
The Refresh Time determines how often the Scheduled Jobs Manager should run. This is different to the server's Unix Cron time which is only used to invoke the Scheduled Jobs Manager. Each time the Unix Cron is run, Matrix checks if there is any need to run any Scheduled Jobs based on the Refresh Time. It will then only run jobs if there are no remaining or ongoing jobs that are blocking the current run and the Refresh Time is up.
- 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 Scheduled Jobs 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 Scheduled Jobs 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 Scheduled Jobs Manager will not attempt to run it again.
- Blackout Periods: this section allows you to specify times that the Scheduled Jobs Manager should not be running, for example during business hours. Enter the from and to times, as well as the days when the Scheduled Jobs 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.
- 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.
- Maximum Years: specifies the number of years displayed to users when setting a future scheduled job. For example, if the year is 2012 and you set this value to 1, only up to 2013 will be selectable when setting future scheduled jobs. By default, this field will be set to 10, meaning that users will be able to set the future date of scheduled jobs up to ten years into the future, only.
- Scheduled Jobs Deadlock Email Receivers: specify the users (in addition to the Root User and those specified in the system's main.inc file) to receive Scheduled Jobs Deadlock email notifications when the Scheduled Jobs Manager may have stalled and cannot run.
To specify a user(s) to receive Scheduled Jobs 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 Scheduled Jobs Deadlock emails.
Running Status Screen
The Running Status screen shows information about the status of jobs currently being run by the Scheduled Jobs Manager .
The information that is available on this screen is as follows. Please note that you cannot edit any of this information.
This section shows information about the running status of the Scheduled Jobs Manager . The Running Status section of the Running Status screen is shown in the figure below.
The fields that are available on this screen are as follows:
- Running: shows whether the Scheduled Jobs Manager is currently running jobs or not.
- Last Run: shows the date and time of the last time the Scheduled Jobs Manager was run.
- Run Check: shows the number of times that the Scheduled Jobs Manager attempted to start a run, when the Running field was Yes. If the Scheduled Jobs 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 Scheduled Jobs Manager could be in a deadlock. This means that there could be a job that is stalled for some reason and the Scheduled Jobs 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.
Scheduled Job Details Screen
Some Scheduled Jobs have configuration options available to them on their Details screen. These options allow you to control how frequently the job will run and at what time.
The available configuration options on the Details screen are:
- When: select how often the Scheduled Job will be run. The available options are:
- Hourly: if this is selected, the job will run once every hour based on the minute selection chosen.
- Daily: if this is selected, the job will run once every day based on the hour and minute selection chosen.
The Scheduled Jobs that can have this setting configured include:
Let Us Know What You Think
Let us know if you spot any errors or if you have any ideas on how we can improve the Matrix Community Website.
Contact Squiz for Demo
Let us show you the true power of Squiz Matrix by giving you a personalised demonstration.