Skip to content

Commit

Permalink
fix 'Error cronjob->run_job: Permission denied' and add time and logi…
Browse files Browse the repository at this point in the history
…n used for debug helps
  • Loading branch information
rycks committed Aug 20, 2017
1 parent dcd1a08 commit b77fe28
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scripts/cron/cron_run_jobs.php
Expand Up @@ -68,9 +68,11 @@
/*
* 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)
Expand Down Expand Up @@ -114,7 +116,9 @@
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];
Expand All @@ -138,9 +142,6 @@

// 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
Expand Down

0 comments on commit b77fe28

Please sign in to comment.