i cant get the scheduled jobs module running. The Jobs are running once when i start them via ``/public/cron/cron_job_run.php/securitykey=xxxx/ …
I tried to copy the line */5 * * * * pathtoscript/scripts/cron/cron_run_jobs.php XXXXXXXXXXXXXX [user] > /var/documents/cron_run_jobs.php.log from the note field but this path dont exists on my server so i modified it to /var/www/html/public/cron/cron_run_jobs.php
I also tried to execute it with various users > root, www-data, global crontab
Can anyone please tell me how my crontab should look like?
If i execute the cron_run_jobs.php via CLI it says:
This page can’t be used as a CLI script. For the CLI version of script, launch cron_run_job.php available into scripts/cron/ directory.
I saved the scripts folder in my dolibarr_main_document_root = /var/www/html/
Now if i try to start it manual the following message appears:
root@h2874304:~# sudo -u www-data php /var/www/html/scripts/cron/cron_run_jobs.php
PHP Warning: require_once(/var/www/html/scripts/cron/…/…/htdocs/master.inc.php): failed to open stream: No such file or directory in /var/www/html/scripts/cron/cron_run_jobs.php on line 45
PHP Fatal error: require_once(): Failed opening required ‘/var/www/html/scripts/cron/…/…/htdocs/master.inc.php’ (include_path=‘.:/usr/share/php’) in /var/www/html/scripts/cron/cron_run_jobs.php on line 45
Thank you for your help. I figured out that my scripts directory was missing and after restoring it and defining the correct path to the master.inc.php it is working now