cron
1 | crontab -u www-data -e |
Systemd
- Create files in /etc/systemd/system/nextcloudcron.service
1
2
3
4
5
6[Unit]
Description=Nextcloud cron.php job
[Service]
User=www-data
ExecStart=/usr/local/bin/php -f /var/www/html/nextcloud/cron.php
KillMode=process
- Create files in /etc/systemd/system/nextcloudcron.service
- Create files in /etc/systemd/system/nextcloudcron.timer
1
2
3
4
5
6
7
8
9[Unit]
Description=Run Nextcloud cron.php every 5 minutes
[Timer]
OnBootSec=5min
OnUnitActiveSec=5min
Unit=nextcloudcron.service
[Install]
WantedBy=timers.target
systemctl enable --now nextcloudcron.timer
- Create files in /etc/systemd/system/nextcloudcron.timer
Run
1 | docker exec -it --user www-data nextcloud /usr/local/bin/php -f /var/www/html/nextcloud/cron.php |