Offline Job Queues

The purpose of the Offline Jobs function is to delegate slow processes, such as creating a preview for a video file, to another script/process to be run asynchronously. The upload process therefore focuses on getting files into the filestore, later working from a queue for further processing.

Originally developed to work alongside the Video Tracks plugin, job queue functionality has been expanded to allow the following to be handled offline:

  • Creating an alternative file from the specified command
  • Running a command that will create an output file, optionally specifying a download URL that can be sent to the user
  • Creating previews for resources or alternative files
  • Deleting files
  • Extracting text from the resource and saving to a configured metadata field

Offline jobs cannot be run individually by a user, they are run in the command line, usually using a regular cron job.

To enable this perform the following steps:-

  1. Enable a scheduled task (Windows) or cron job (Linux) that runs /pages/tools/offline_jobs.php as frequently as desired e.g.
    */5 * * * * cd /var/www/pages/tools; php offline_jobs.php
  2. Set the following option in the ResourceSpace configuration file (config.php)