![]() service is started: Īnd will automatically start and enable the timer. WorkingDirectory=/var/opt/nextcloud-mydomainĪnd /etc/systemd/systemd/nextcloud-mydomain-cron.timer containing the logic when the. The script will create /etc/systemd/systemd/rvice containing the specification on what exactly to run: ĮxecStart=/usr/bin/docker-compose exec -T -u www-data nextcloud php cron.php etc/systemd/system/nextcloud-mydomain-cron.timerĮnabling & starting nextcloud-mydomain-cron.timerĬreated symlink /etc/systemd/system//nextcloud-mydomain-cron.timer → /etc/systemd/system/nextcloud-mydomain-cron.timer. etc/systemd/system/rviceĬreating systemd timer. For example, running the script in /var/lib/nextcloud-mydomain will cause nextcloud-mydomain-cron to be used a service name.Įxample output from the script: Creating systemd service. Note that the script will use the directory name as a name for the service and timer that is created. ![]() In order to run our autoinstall script, run: wget -qO- | sudo bash /dev/stdinįrom the directory where docker-compose.yml is located. We created a script that automatically creates a systemd timer and related service to run cron.php hourly using the command from our previous post How to run Nextcloud cron in a docker-compose based setup: This post shows you a really quick method to create a systemd timer that runs cron.php on dockerized nextcloud (using docker-compose).
0 Comments
Leave a Reply. |