Skip to content
Mark Metcalfe 👽 edited this page Nov 21, 2025 · 8 revisions

Running Cron Manually

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

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

Crontab Setup

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:

PATH=$PATH:/usr/bin:/usr/local/bin

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

Enable cron for the php-8.3 container by setting CRON_CONTAINER in your .env file to be:

# PHP container to run cron within
## This is so that there aren't multiple cron daemons running if you have multiple PHP containers running at once
CRON_CONTAINER=php-8.3

You'll now see the cron task output in the logs for the PHP container you've picked (e.g. when running tlogs php-8.3)

Clone this wiki locally