-
-
Notifications
You must be signed in to change notification settings - Fork 215
Managing cron
scubamuc edited this page Jul 20, 2024
·
14 revisions
sudo snap get nextcloud nextcloud.cron-interval
value =10 in minutes
sudo snap set nextcloud nextcloud.cron-interval=10
sudo snap restart nextcloud.nextcloud-cron
sudo nextcloud.occ background:cron
sudo snap set nextcloud nextcloud.cron-interval=-1
value =10 in minutes
sudo snap set nextcloud nextcloud.cron-interval=10
sudo crontab -l
sudo crontab -e
* * * * * nextcloud.occ <function>:<command> <--option>
Examples:
scan files
* * * * * nextcloud.occ files:scan --all
preview generator
* * * * * nextcloud.occ preview:generate-all -vvv
clean trash
* * * * * nextcloud.occ trashbin:cleanup --all-users
best practice to run user scripts requiring root privileges as cronjob
* * * * * su <USER> /home/<USER>/path/to/script.sh
Nextcloud snap Wiki, use all information and scripts at own risk