Qual: All script files must add a line into log when launched.
This commit is contained in:
parent
6db9b67e35
commit
7481aa121e
@ -60,6 +60,7 @@ $error=0;
|
|||||||
|
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
||||||
|
dol_syslog($script_file." launched with arg ".join(',',$argv));
|
||||||
|
|
||||||
if (! isset($argv[3]) || ! $argv[3]) {
|
if (! isset($argv[3]) || ! $argv[3]) {
|
||||||
print "Usage: ".$script_file." bank_ref bank_receipt_number (csv|tsv|excel|excel2007) [lang=xx_XX]\n";
|
print "Usage: ".$script_file." bank_ref bank_receipt_number (csv|tsv|excel|excel2007) [lang=xx_XX]\n";
|
||||||
|
|||||||
@ -60,6 +60,7 @@ $error=0;
|
|||||||
|
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
||||||
|
dol_syslog($script_file." launched with arg ".join(',',$argv));
|
||||||
|
|
||||||
$fname = DOL_DATA_ROOT.'/export-contacts.xls';
|
$fname = DOL_DATA_ROOT.'/export-contacts.xls';
|
||||||
|
|
||||||
|
|||||||
@ -57,6 +57,7 @@ $error=0;
|
|||||||
|
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
||||||
|
dol_syslog($script_file." launched with arg ".join(',',$argv));
|
||||||
|
|
||||||
print "Mails sending disabled (useless in batch mode)\n";
|
print "Mails sending disabled (useless in batch mode)\n";
|
||||||
$conf->global->MAIN_DISABLE_ALL_MAILS=1; // On bloque les mails
|
$conf->global->MAIN_DISABLE_ALL_MAILS=1; // On bloque les mails
|
||||||
|
|||||||
@ -66,6 +66,7 @@ $error=0;
|
|||||||
|
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
||||||
|
dol_syslog($script_file." launched with arg ".join(',',$argv));
|
||||||
|
|
||||||
$now=dol_now('tzserver');
|
$now=dol_now('tzserver');
|
||||||
$duration_value=isset($argv[2])?$argv[2]:'none';
|
$duration_value=isset($argv[2])?$argv[2]:'none';
|
||||||
|
|||||||
@ -66,6 +66,7 @@ $error=0;
|
|||||||
|
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
||||||
|
dol_syslog($script_file." launched with arg ".join(',',$argv));
|
||||||
|
|
||||||
$now=dol_now('tzserver');
|
$now=dol_now('tzserver');
|
||||||
$duration_value=isset($argv[2])?$argv[2]:'none';
|
$duration_value=isset($argv[2])?$argv[2]:'none';
|
||||||
|
|||||||
@ -67,6 +67,7 @@ $error=0;
|
|||||||
|
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
||||||
|
dol_syslog($script_file." launched with arg ".join(',',$argv));
|
||||||
|
|
||||||
$now=dol_now('tzserver');
|
$now=dol_now('tzserver');
|
||||||
$duration_value=isset($argv[3])?$argv[3]:'none';
|
$duration_value=isset($argv[3])?$argv[3]:'none';
|
||||||
|
|||||||
@ -66,6 +66,7 @@ $error=0;
|
|||||||
|
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
||||||
|
dol_syslog($script_file." launched with arg ".join(',',$argv));
|
||||||
|
|
||||||
$now=dol_now('tzserver');
|
$now=dol_now('tzserver');
|
||||||
$duration_value=isset($argv[2])?$argv[2]:'none';
|
$duration_value=isset($argv[2])?$argv[2]:'none';
|
||||||
|
|||||||
@ -57,6 +57,7 @@ $error=0;
|
|||||||
|
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
||||||
|
dol_syslog($script_file." launched with arg ".join(',',$argv));
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
if (! isset($argv[1]))
|
if (! isset($argv[1]))
|
||||||
|
|||||||
@ -52,6 +52,7 @@ $error=0;
|
|||||||
|
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
||||||
|
dol_syslog($script_file." launched with arg ".join(',',$argv));
|
||||||
|
|
||||||
if (! isset($argv[1]) || ! $argv[1]) {
|
if (! isset($argv[1]) || ! $argv[1]) {
|
||||||
print "Usage: $script_file now\n";
|
print "Usage: $script_file now\n";
|
||||||
|
|||||||
@ -57,6 +57,7 @@ $forcecommit=0;
|
|||||||
|
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
||||||
|
dol_syslog($script_file." launched with arg ".join(',',$argv));
|
||||||
|
|
||||||
// List of fields to get from LDAP
|
// List of fields to get from LDAP
|
||||||
$required_fields = array(
|
$required_fields = array(
|
||||||
|
|||||||
@ -55,6 +55,7 @@ $error=0;
|
|||||||
|
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
||||||
|
dol_syslog($script_file." launched with arg ".join(',',$argv));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (! $conf->global->LDAP_SYNCHRO_ACTIVE)
|
if (! $conf->global->LDAP_SYNCHRO_ACTIVE)
|
||||||
|
|||||||
@ -57,7 +57,7 @@ $forcecommit=0;
|
|||||||
|
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
||||||
|
dol_syslog($script_file." launched with arg ".join(',',$argv));
|
||||||
|
|
||||||
// List of fields to get from LDAP
|
// List of fields to get from LDAP
|
||||||
$required_fields = array(
|
$required_fields = array(
|
||||||
|
|||||||
@ -55,6 +55,7 @@ $error=0;
|
|||||||
|
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
||||||
|
dol_syslog($script_file." launched with arg ".join(',',$argv));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (! $conf->global->LDAP_SYNCHRO_ACTIVE)
|
if (! $conf->global->LDAP_SYNCHRO_ACTIVE)
|
||||||
|
|||||||
@ -55,6 +55,7 @@ $forcecommit=0;
|
|||||||
|
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
||||||
|
dol_syslog($script_file." launched with arg ".join(',',$argv));
|
||||||
|
|
||||||
// List of fields to get from LDAP
|
// List of fields to get from LDAP
|
||||||
$required_fields = array(
|
$required_fields = array(
|
||||||
|
|||||||
@ -51,8 +51,9 @@ $error=0;
|
|||||||
|
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
|
||||||
|
dol_syslog($script_file." launched with arg ".join(',',$argv));
|
||||||
|
|
||||||
$datetimeprev = time();
|
$datetimeprev = dol_now();
|
||||||
|
|
||||||
$month = strftime("%m", $datetimeprev);
|
$month = strftime("%m", $datetimeprev);
|
||||||
$year = strftime("%Y", $datetimeprev);
|
$year = strftime("%Y", $datetimeprev);
|
||||||
@ -60,8 +61,6 @@ $year = strftime("%Y", $datetimeprev);
|
|||||||
$user = new user($db);
|
$user = new user($db);
|
||||||
$user->fetch($conf->global->PRELEVEMENT_USER);
|
$user->fetch($conf->global->PRELEVEMENT_USER);
|
||||||
|
|
||||||
|
|
||||||
print "***** ".$script_file." (".$version.") *****\n";
|
|
||||||
if (! isset($argv[1])) { // Check parameters
|
if (! isset($argv[1])) { // Check parameters
|
||||||
print "This script check invoices with a withdrawal request and\n";
|
print "This script check invoices with a withdrawal request and\n";
|
||||||
print "then create payment and build a withdraw file.\n";
|
print "then create payment and build a withdraw file.\n";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user