Installing and upgrading
Backups
Security
User management
Advanced user group options
Customising ResourceSpace
Plugins
StaticSync
Configuring ResourceSpace
Integrations

Setting up scheduled tasks/cron

For ResourceSpace to send notifications and perform regular tasks your system must be configured to run pages/tools/cron_copy_hitcount.php regularly.

The task should be set to run at least once daily, but if configuration options such as $file_integrity_verify_window or $new_action_email_interval (version 10.3+) are enabled then the schedule should be adjusted to run much more frequently e.g. every 15 minutes, or even every minute.

Linux

To set up the cron job:

sudo nano /etc/cron.d/resourcespace

Add the lines below. The path to cron_copy_hitcount and schedule should be adjusted as required.

#!/bin/sh
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
*/15 * * * *   www-data   cd /path/to/pages/tools;nice ionice php cron_copy_hitcount.php

Ctrl+O, Ctrl+X to save and quit.

macOS

Launch Terminal on your Mac.

Open the crontab editor by typing:

crontab -e

In the editor that opens, add the following line at the end of the file to set the script to run every 15 minutes:

*/15 * * * * /usr/bin/php /path/to/pages/tools/cron_copy_hitcount.php

Ensure the path to PHP in the command "/usr/bin/php" is correct, change "/path/to/" to the location of your ResourceSpace installation. 

After adding the line, save and exit the editor (for example, press Control + X, then Y to confirm and Enter if using nano).

Windows

Using the Windows Task Scheduler utility:

  • Action: "Start a program"
  • Program/script: "path/to/php.exe"
  • Add arguments: -f "path/to/pages/tools/cron_copy_hitcount.php"
  • The user used must have the same level of access as the web server application pool user