New: Show process id in all command line scripts

This commit is contained in:
Laurent Destailleur 2013-05-22 12:23:42 +02:00
parent 0bffb6e654
commit e9df560b74
19 changed files with 20 additions and 19 deletions

View File

@ -13,6 +13,7 @@ For users:
- New: Add option "filter=bank" onto script rebuild_merge_pdf.php to merge - New: Add option "filter=bank" onto script rebuild_merge_pdf.php to merge
PDF that has one payment on a specific bank account.* PDF that has one payment on a specific bank account.*
- New: [ task #901 ] Add Extrafeild on Fiche Inter - New: [ task #901 ] Add Extrafeild on Fiche Inter
- New: Show process id in all command line scripts
For developers: For developers:
- New: DolGraph can build graph with three lines. - New: DolGraph can build graph with three lines.

View File

@ -34,7 +34,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
exit; exit;
} }
// Init global variables // Global variables
$version='1.0'; $version='1.0';
$error=0; $error=0;
@ -57,7 +57,7 @@ if (! $result > 0) { dol_print_error('',$user->error); exit; }
$user->getrights(); $user->getrights();
print "***** ".$script_file." (".$version.") *****\n"; print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
if (! isset($argv[1])) { // Check parameters if (! isset($argv[1])) { // Check parameters
print "Usage: ".$script_file." param1 param2 ...\n"; print "Usage: ".$script_file." param1 param2 ...\n";
exit; exit;

View File

@ -59,7 +59,7 @@ $error=0;
*/ */
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") *****\n"; print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
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";

View File

@ -59,7 +59,7 @@ $error=0;
*/ */
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") *****\n"; print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
$fname = DOL_DATA_ROOT.'/export-contacts.xls'; $fname = DOL_DATA_ROOT.'/export-contacts.xls';

View File

@ -56,7 +56,7 @@ $error=0;
*/ */
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") *****\n"; print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
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

View File

@ -65,7 +65,7 @@ $error=0;
*/ */
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") *****\n"; print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
$now=dol_now('tzserver'); $now=dol_now('tzserver');
$duration_value=isset($argv[2])?$argv[2]:'none'; $duration_value=isset($argv[2])?$argv[2]:'none';

View File

@ -65,7 +65,7 @@ $error=0;
*/ */
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") *****\n"; print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
$now=dol_now('tzserver'); $now=dol_now('tzserver');
$duration_value=isset($argv[2])?$argv[2]:'none'; $duration_value=isset($argv[2])?$argv[2]:'none';

View File

@ -69,7 +69,7 @@ $error=0;
*/ */
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") *****\n"; print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
// Check security key // Check security key
if ($key != $conf->global->CRON_KEY) if ($key != $conf->global->CRON_KEY)

View File

@ -56,7 +56,7 @@ $error=0;
*/ */
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") *****\n"; print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";

View File

@ -65,7 +65,7 @@ $error=0;
*/ */
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") *****\n"; print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
$now=dol_now('tzserver'); $now=dol_now('tzserver');
$duration_value=isset($argv[3])?$argv[3]:'none'; $duration_value=isset($argv[3])?$argv[3]:'none';

View File

@ -65,7 +65,7 @@ $error=0;
*/ */
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") *****\n"; print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
$now=dol_now('tzserver'); $now=dol_now('tzserver');
$duration_value=isset($argv[2])?$argv[2]:'none'; $duration_value=isset($argv[2])?$argv[2]:'none';

View File

@ -56,7 +56,7 @@ $error=0;
*/ */
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") *****\n"; print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
// Check parameters // Check parameters
if (! isset($argv[1])) if (! isset($argv[1]))

View File

@ -51,7 +51,7 @@ $error=0;
*/ */
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") *****\n"; print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
if (! isset($argv[1]) || ! $argv[1]) { if (! isset($argv[1]) || ! $argv[1]) {
print "Usage: $script_file now\n"; print "Usage: $script_file now\n";

View File

@ -56,7 +56,7 @@ $forcecommit=0;
*/ */
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") *****\n"; print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
// List of fields to get from LDAP // List of fields to get from LDAP
$required_fields = array( $required_fields = array(

View File

@ -54,7 +54,7 @@ $error=0;
*/ */
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") *****\n"; print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
/* /*
if (! $conf->global->LDAP_SYNCHRO_ACTIVE) if (! $conf->global->LDAP_SYNCHRO_ACTIVE)

View File

@ -56,7 +56,7 @@ $forcecommit=0;
*/ */
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") *****\n"; print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
// List of fields to get from LDAP // List of fields to get from LDAP

View File

@ -54,7 +54,7 @@ $error=0;
*/ */
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") *****\n"; print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
/* /*
if (! $conf->global->LDAP_SYNCHRO_ACTIVE) if (! $conf->global->LDAP_SYNCHRO_ACTIVE)

View File

@ -54,7 +54,7 @@ $forcecommit=0;
*/ */
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") *****\n"; print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
// List of fields to get from LDAP // List of fields to get from LDAP
$required_fields = array( $required_fields = array(

View File

@ -50,7 +50,7 @@ $error=0;
*/ */
@set_time_limit(0); @set_time_limit(0);
print "***** ".$script_file." (".$version.") *****\n"; print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
$datetimeprev = time(); $datetimeprev = time();