From d5ec19ef83118ac6b875f8f7f781fbdd4343088b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Feb 2015 13:21:12 +0100 Subject: [PATCH] Enhance help when running cron script from command line --- htdocs/core/lib/cron.lib.php | 2 ++ htdocs/cron/admin/cron.php | 10 ++++++---- htdocs/langs/en_US/cron.lang | 4 ++-- scripts/cron/cron_run_jobs.php | 3 +++ 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/htdocs/core/lib/cron.lib.php b/htdocs/core/lib/cron.lib.php index 79e23e90089..2f14b0242d4 100644 --- a/htdocs/core/lib/cron.lib.php +++ b/htdocs/core/lib/cron.lib.php @@ -115,6 +115,8 @@ function dol_print_cron_urls() if ($linuxlike) { print $langs->trans("CronExplainHowToRunUnix"); + print '
'; + print '
'; } else { diff --git a/htdocs/cron/admin/cron.php b/htdocs/cron/admin/cron.php index d03dff03b3e..b77a8048db8 100644 --- a/htdocs/cron/admin/cron.php +++ b/htdocs/cron/admin/cron.php @@ -71,12 +71,13 @@ print_fiche_titre($langs->trans("CronSetup"),$linkback,'setup'); // Configuration header $head = cronadmin_prepare_head(); +print '
'; +print ''; + dol_fiche_head($head,'setup',$langs->trans("Module2300Name"),0,'cron'); print "
\n"; -print ''; -print ''; print ''; print ''; @@ -96,13 +97,14 @@ print ''; print '
'; -print '
'; +dol_fiche_end(); + +print '
'; print ''; print '
'; print ''; -dol_fiche_end(); print '

'; diff --git a/htdocs/langs/en_US/cron.lang b/htdocs/langs/en_US/cron.lang index 5432c5b5b52..10ce884e3cc 100644 --- a/htdocs/langs/en_US/cron.lang +++ b/htdocs/langs/en_US/cron.lang @@ -14,8 +14,8 @@ URLToLaunchCronJobs=URL to check and launch cron jobs if required OrToLaunchASpecificJob=Or to check and launch a specific job KeyForCronAccess=Security key for URL to launch cron jobs FileToLaunchCronJobs=Command line to launch cron jobs -CronExplainHowToRunUnix=On Unix environment you should use crontab to run Command line each minutes -CronExplainHowToRunWin=On Microsoft(tm) Windows environement you can use Scheduled task tools to run Command line each minutes +CronExplainHowToRunUnix=On Unix environment you should use the following crontab entry to run the command line each 5 minutes +CronExplainHowToRunWin=On Microsoft(tm) Windows environement you can use Scheduled task tools to run the command line each 5 minutes # Menu CronJobs=Scheduled jobs CronListActive=List of active/scheduled jobs diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php index 52bc3c993c8..ad6f97e3d5c 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -170,9 +170,12 @@ function usage($path,$script_file) global $conf; print "Usage: ".$script_file." securitykey userlogin [cronjobid]\n"; + print "The script return 0 when everything worked successfully.\n"; print "\n"; print "On Linux system, you can have cron jobs ran automatically by adding an entry into cron.\n"; print "For example, to run pending tasks each day at 3:30, you can add this line:\n"; print "30 3 * * * ".$path.$script_file." securitykey userlogin > ".DOL_DATA_ROOT."/".$script_file.".log\n"; + print "For example, to run pending tasks every 5mn, you can add this line:\n"; + print "*/5 * * * * ".$path.$script_file." securitykey userlogin > ".DOL_DATA_ROOT."/".$script_file.".log\n"; }