Merge pull request #7272 from rycks/5.0_cron
FIX 'Error cronjob->run_job: Permission denied'
This commit is contained in:
commit
5b0e6297bb
@ -55,10 +55,10 @@ $key=$argv[1];
|
|||||||
if (! isset($argv[2]) || ! $argv[2]) {
|
if (! isset($argv[2]) || ! $argv[2]) {
|
||||||
usage($path,$script_file);
|
usage($path,$script_file);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
} else {
|
|
||||||
$userlogin=$argv[2];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$userlogin=$argv[2];
|
||||||
|
|
||||||
|
|
||||||
// Global variables
|
// Global variables
|
||||||
$version=DOL_VERSION;
|
$version=DOL_VERSION;
|
||||||
@ -68,9 +68,11 @@ $error=0;
|
|||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
*/
|
*/
|
||||||
|
// current date
|
||||||
|
$now=dol_now();
|
||||||
|
|
||||||
@set_time_limit(0);
|
@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
|
// Check security key
|
||||||
if ($key != $conf->global->CRON_KEY)
|
if ($key != $conf->global->CRON_KEY)
|
||||||
@ -114,6 +116,7 @@ else
|
|||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$user->getrights();
|
||||||
|
|
||||||
if (isset($argv[3]) || $argv[3])
|
if (isset($argv[3]) || $argv[3])
|
||||||
{
|
{
|
||||||
@ -138,9 +141,6 @@ if ($result<0)
|
|||||||
|
|
||||||
// TODO This sequence of code must be shared with code into cron_run_jobs.php php page.
|
// 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))
|
if(is_array($object->lines) && (count($object->lines)>0))
|
||||||
{
|
{
|
||||||
// Loop over job
|
// Loop over job
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user