There seems to be a couple ways I can define cron jobs in crontab. Mine are below. Some use “php -f”, such as the one for cron.php, while others do not use “-f”, but it stills seems to work fine, specifically for the OCC commands. My assumption is that a third way is to remove “php” and just execute OCC directly.
Can someone explain the best way to execute the commands below? Is -f needed? Thanks.
*/15 * * * * php -f /var/www/html/nextcloud/cron.php
*/30 * * * * php /var/www/html/nextcloud/occ preview:pre-generate
0 4 * * * php /var/www/html/nextcloud/occ preview:generate-all --path=“ryan/files/Pictures”
0 5 * * * php /var/www/html/nextcloud/occ files:scan --path=“ryan/files”