Unix Cron & WordPress
Versie door Jeroen Strompf (overleg | bijdragen) op 17 feb 2022 om 12:58 (Nieuwe pagina aangemaakt met 'Creëer voor elke WordPress-site een ''cron job'' for user '''www-data'' == Syntaxis == Timefields: <pre> Minute Hour Day of month Month Day of week...')
Creëer voor elke WordPress-site een cron job for user 'www-data
Syntaxis
Timefields:
Minute Hour Day of month Month Day of week Opmerkingen 0-59 0-23 1-31 1-12 0-6 (0 = Sunday) Mogelijke waardes ------ ---- ------------ ----- ---------------- ----------- 0 16 1,15 * * Do something on day 1 & 15 at 16:00 */10 * * * * Do something every 10 minutes
Voorbeelden:
0 16 1,15 * * echo Timesheets Due > /dev/console # */10 * * * *
Basics
$ crontab -l no crontab for jeroen $ crontab -l -u www-data must be privileged to use -u $ sudo crontab -l -u www-data no crontab for www-data
Bronnen
- https://docs.wp-rocket.me/article/1279-cron-and-wp-rocket
- https://stackoverflow.com/questions/46442933/create-cronjob-ubuntu-for-user-www-data-using-bash#46443063
- https://docs.oracle.com/cd/E19455-01/805-7229/sysrescron-62861/index.html
- https://crontab.guru/every-10-minutes
- https://www.cyberciti.biz/faq/crontab-every-10-min/