1.1. Scheduled Tasks

OJS includes a scheduled tasks script that will periodically execute certain tasks (such as send out periodic Review Reminder emails). To enable this script, you will have to enable the option in config.inc.php, and also set up the appropriate cron job on your server.

Open config.inc.php and under the general section find

; scheduled_tasks = Off

Change that line to

scheduled_tasks = On

keeping in mind to remove the semi-colon at the beginning of the line.

You will then need to instruct your server to periodically execute (as the same user your webserver is running under) the PHP script found at tools/runScheduledTasks.php in your OJS directory. On *nix operating systems, this is typically done by adding a simple cron task, whereas on Windows systems you can use the Windows Task Scheduler. Detailed instructions for each can be found in docs/README.

If using the scheduled tasks script, it is recommended that the script be set up to execute at least once per day.

On *nix operating systems, this can be done by adding a simple cron task:

# crontab -e www
0 * * * *       php /path/to/ojs2/tools/runScheduledTasks.php

In this example the script would be executed every hour.

On Windows XP systems, this can be done by using the Windows Task Scheduler:

  1. From the Control Panel, double-click on Scheduled Tasks.

  2. Right-click within the Scheduled Tasks window and choose: New > Scheduled Task

  3. Under the Task tab, in the Run field, enter: php c:\path\to\ojs2\tools\runScheduledTasks.php

  4. You will also be asked to specify the folder to start this task in (which will usually be the folder that PHP was installed into) and the user under which the task will be executed as.

  5. Under Schedule tab and the Settings tab, you can more specifically configure the task. For example, you can choose start and end dates for this scheduled task and also how often to execute this task.