From b77fe285dc9acc03aaf9be20d670a8d34bb7e6b8 Mon Sep 17 00:00:00 2001 From: Eric Seigne Date: Sun, 20 Aug 2017 09:39:51 +0200 Subject: [PATCH] fix 'Error cronjob->run_job: Permission denied' and add time and login used for debug helps --- scripts/cron/cron_run_jobs.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php index fb03cad5757..28de8c46ab3 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -68,9 +68,11 @@ $error=0; /* * Main */ +// current date +$now=dol_now(); @set_time_limit(0); -print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n"; +print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." ***** userlogin=" . $userlogin . " ***** " . $now . " *****\n"; // Check security key if ($key != $conf->global->CRON_KEY) @@ -114,7 +116,9 @@ else exit(-1); } } - +//erics cf https://www.dolibarr.org/forum/12-howto-help/26035-cron-run-jobs-php-error-permission-denied +$user->getrights(); + if (isset($argv[3]) || $argv[3]) { $id = $argv[3]; @@ -138,9 +142,6 @@ if ($result<0) // TODO This sequence of code must be shared with code into cron_run_jobs.php php page. -// current date -$now=dol_now(); - if(is_array($object->lines) && (count($object->lines)>0)) { // Loop over job