Scheduled jobs manager

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 run it at the required date and time.

The scheduled jobs manager is located under the system management folder in the asset tree.

Management of scheduled jobs is done on the View jobs, Options, and Running status screens, explained in this documentation.

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 scheduled to take place at a future date and time, for example, a future linking or future status job. Read the Asset screens documentation for more information on how to set up these jobs.

The scheduled jobs section of the View jobs screen is shown in the figure below.

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 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 shown:

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

Select this box and click Save to delete the scheduled job. The scheduled jobs manager will no longer run the job.

Every time

This section shows the jobs scheduled to take place every time the scheduled jobs manager 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. Read the Custom form documentation for more information.

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 Matrix.

Manage pending accounts scheduled job

This job will send out reminder emails to users that have created a user account through 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. Read the Account manager page for more information.

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 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. Read the Search assets documentation for more information on the search report

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 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 select any approval processes that are currently running and auto escalate it to the next step in the process, and send out reminder emails. Read the Asset schemas screen documentation for more information about workflow.

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 Matrix server. Read the Custom form documentation for more information.

Sync squiz suite products scheduled job

This job runs on an hourly basis and will sync the Squiz Suite products connected with Matrix.

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 daily, 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. Read the SharePoint documentation for more information.

Update trim record scheduled job

This job runs daily, at midnight (by default), and updates the trim documents on trim saved search assets. Read the TRIM connector documentation for more information.

Update SharePoint record scheduled job

This job runs daily, at midnight (by default), and updates the SharePoint documents on SharePoint saved search assets. Read the SharePoint documentation for more information.

Escalate safe trash scheduled job

This job runs daily 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 daily at 4:00 AM by default and generates the Google analytics report data for your assets. This data can be viewed on the Analytics screen in Edit+ for 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):

  1. Go to the View jobs screen.

  2. Select the Delete box for the job you want to delete in the One-off section.

  3. Click Save. The scheduled jobs manager will no longer run the scheduled job.

You cannot delete the default scheduled jobs, as Matrix needs these to perform tasks within the system.

Options screen

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 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 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 of 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 from 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 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 select field equals the number specified in this field, a deadlock situation may have occurred, and a warning email will be sent to an administrator. By default, this number is 3, meaning that the scheduled jobs manager will attempt to re-start itself three times before the email is sent.

Max number of failed attempts

Enter the number of times 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 rerun it.

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 and 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 from 9:00 to 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 additional blackout periods:

  1. Select the Add box.

  2. Click Save. An additional row will be added to the blackout period section, as shown in the figure below.

    5 0 0 additional blackout period
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 can 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:

  1. Click the Change button.

  2. Select a user, user group, or role from the asset tree or enter the asset ID of the user, user group, or role.

  3. Click Save.

  4. Click the More…​ button to specify additional users.

    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.

You cannot edit any of this information.

Running status

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.

5 0 0 running status section cron manager

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 select

This shows the number of times 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 tried to start a new run, it would fail, and the run select would increment by one. This is known as a blocked run.

Dead lock status

If the run select 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 stalled job 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 and will allow you to clear the deadlock.

Only users with root system access are allowed to clear the deadlock.

The deadlock status section of the running status screen is shown in the example below.

5 0 0 dead lock status section cron manager

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:

  • Update TRIM record scheduled job

  • Update HPRM record scheduled job

  • Update SharePoint record scheduled job

  • Sync CMIS bridges scheduled job

© 2015- Squiz Pty Ltd