Crontab Info



for Nextcloud:

Nextcloud better example:

$ sudo -u www-data crontab -e

then enter the code below at the bottom (runs every 4 hours):

* */4 * * * php -f /var/www/html/nextcloud/cron.php

0r everyday at 2am:

* 2 * * * php -f /var/www/html/nextcloud/cron.php

To verify if the cron job has been added and scheduled:

$ sudo -u www-data crontab -l

More info & editing crontabs:

to edit the crontab:

sudo -u www-data crontab -e

How can I tell if my crontab has run:
check ‘/var/log/syslog'

or better yet:

to check cron status:

$ systemctl status cron

also, how to run a cron manually (the example below is for nextcloud):

$ sudo -u www-data php -f /var/www/html/nextcloud/cron.php

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.