Skip to content
Derschatta edited this page Nov 1, 2023 · 5 revisions

The site cron task can be manually run by logging into a php container and running:

cron # Alias for php admin/cli/cron.php

You can also use the cron containers to run the cron automatically using crontab.

Prerequisite: Create your own crontab file within the cron.d folder. Copy the example file and adjust the paths in there. For every instance you'd want to run the cron for there needs to be a line in there with the correct paths.

Example:

# If 17.totara80 is what you are using
* * * * *   cd /var/www/totara/src/17 && php server/admin/cli/cron.php > /proc/1/fd/1 2>/proc/1/fd/2

Start a cron container like:

# in the background
tup php-7.4-cron

# in the foreground
tdocker up php-7.4-cron

# access the logs anytime with
tdocker logs -f php-7.4-cron

# stop a daemonized cron container
tstop php-7.4-cron
Clone this wiki locally