Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

Commit

Permalink
background_jobs_configuration: Recommend one minute interval
Browse files Browse the repository at this point in the history
  • Loading branch information
guruz committed Feb 14, 2018
1 parent 93ba9be commit 2d38954
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Cron jobs are commands or shell-based scripts that are scheduled to periodically
ownCloud plug-in applications can register actions with ``cron.php`` automatically to take care of typical housekeeping operations.
These actions can include garbage collecting of temporary files or checking for newly updated files using ``filescan()`` on externally mounted file systems.

You can decide how often jobs get processed, we recommend an interval of one minute.

.. _cron_job_label:

Cron Jobs
Expand Down Expand Up @@ -48,20 +50,20 @@ Cron
Using the operating system Cron feature is the preferred method for executing regular tasks.
This method enables the execution of scheduled jobs without the inherent limitations which the web server might have.

For example, to run a Cron job on a \*nix system every 15 minutes, under the default web server user (often, ``www-data`` or ``wwwrun``) you must set up the following Cron job to call the **cron.php** script::
For example, to run a Cron job on a \*nix system every minute, under the default web server user (often, ``www-data`` or ``wwwrun``) you must set up the following Cron job to call the **cron.php** script::

# crontab -u www-data -e
*/15 * * * * /usr/bin/php -f /path/to/your/owncloud/cron.php
* * * * * /usr/bin/php -f /path/to/your/owncloud/cron.php

You can verify if the cron job has been added and scheduled by executing::

# crontab -u www-data -l
*/15 * * * * /usr/bin/php -f /path/to/your/owncloud/cron.php
* * * * * /usr/bin/php -f /path/to/your/owncloud/cron.php

.. note::
You have to make sure that ``php`` is found by ``cron``, hence why we’ve deliberately added the full path to the PHP binary above (``/usr/bin/php``). On some systems it might be necessary to use **php-cli** instead of **php**.

Please refer to `the crontab man page`_ for the exact command syntax.
Please refer to `the crontab man page`_ for the exact command syntax if you don't want to have it run every minute.

.. note::
  There are other methods to invoke programs by the system regularly, e.g. `systemd timers`_
Expand Down

0 comments on commit 2d38954

Please sign in to comment.