Enhance help when running cron script from command line
This commit is contained in:
parent
2e3400a039
commit
d5ec19ef83
@ -115,6 +115,8 @@ function dol_print_cron_urls()
|
||||
if ($linuxlike)
|
||||
{
|
||||
print $langs->trans("CronExplainHowToRunUnix");
|
||||
print '<br>';
|
||||
print '<textarea rows="'.ROWS_1.'" style="width:80%">*/5 * * * * pathtoscript/scripts/cron/cron_run_jobs.php '.(empty($conf->global->CRON_KEY)?'securitykey':''.$conf->global->CRON_KEY.'').' '.$user->login.' > '.DOL_DOCUMENT_ROOT.'/cron_run_jobs.php.log</textarea><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -71,12 +71,13 @@ print_fiche_titre($langs->trans("CronSetup"),$linkback,'setup');
|
||||
// Configuration header
|
||||
$head = cronadmin_prepare_head();
|
||||
|
||||
print '<form name="agendasetupform" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
dol_fiche_head($head,'setup',$langs->trans("Module2300Name"),0,'cron');
|
||||
|
||||
print "<br>\n";
|
||||
|
||||
print '<form name="agendasetupform" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
@ -96,13 +97,14 @@ print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><div class="center">';
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" name="save" class="button" value="'.$langs->trans("Save").'">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<br><br>';
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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";
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user