-
Notifications
You must be signed in to change notification settings - Fork 32
Cron
Derschatta edited this page Dec 3, 2024
·
6 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:
PATH=$PATH:/usr/bin:/usr/local/bin
# 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
Copyright (c) 2023 Totara Learning Solutions Limited
- Node.js and Grunt
- PHPUnit
- Behat
- Cron
- Machine Learning
- Mailcatcher (for viewing emails)
- Shell Customisations
- Ngrok (for making your site publicly accessible)
-
PHPStorm Integration
- Performance improvements
- Automated testing integration
- XDebug setup
- Database tools