34 global $langs, $conf, $user;
38 $head[$h][0] = DOL_URL_ROOT.
'/cron/admin/cron.php';
39 $head[$h][1] = $langs->trans(
"Miscellaneous");
40 $head[$h][2] =
'setup';
43 $head[$h][0] = DOL_URL_ROOT.
'/cron/list.php?mode=modulesetup';
44 $head[$h][1] = $langs->trans(
"Module2300Name");
45 $head[$h][2] =
'jobs';
64 global $langs, $conf, $user;
68 $head[$h][0] = DOL_URL_ROOT.
'/cron/card.php?id='.
$object->id;
69 $head[$h][1] = $langs->trans(
"CronTask");
70 $head[$h][2] =
'card';
73 $head[$h][0] = DOL_URL_ROOT.
'/cron/info.php?id='.
$object->id;
74 $head[$h][1] = $langs->trans(
"Info");
75 $head[$h][2] =
'info';
92 global $conf, $langs, $user;
93 global $dolibarr_main_url_root;
96 $urlwithouturlroot = preg_replace(
'/'.preg_quote(DOL_URL_ROOT,
'/').
'$/i',
'', trim($dolibarr_main_url_root));
97 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
101 print
'<div class="div-table-responsive-no-min">';
102 print $langs->trans(
"URLToLaunchCronJobs").
':<br>';
103 $url = $urlwithroot.
'/public/cron/cron_run_jobs_by_url.php?'.(!
getDolGlobalString(
'CRON_KEY') ?
'' :
'securitykey=' .
getDolGlobalString(
'CRON_KEY').
'&').
'userlogin='.$user->login;
104 print
'<div class="urllink">';
105 print
'<input type="text" id="publicurlmember" class="quatrevingtpercentminusx" value="'.$url.
'">';
106 print
' <a href="'.$url.
'" target="_blank" rel="noopener noreferrer">'.
img_picto(
'',
'globe').
"</a>\n";
108 print
'<br> '.$langs->trans(
"OrToLaunchASpecificJob").
'<br>';
109 $url = $urlwithroot.
'/public/cron/cron_run_jobs_by_url.php?'.(!
getDolGlobalString(
'CRON_KEY') ?
'' :
'securitykey=' .
getDolGlobalString(
'CRON_KEY').
'&').
'userlogin='.$user->login.
'&id=cronjobid';
110 print
'<div class="urllink">';
111 print
'<input type="text" id="publicurlmemberall" class="quatrevingtpercentminusx" value="'.$url.
'">';
112 print
' <a href="'.$url.
'" target="_blank" rel="noopener noreferrer">'.
img_picto(
'',
'globe').
"</a>\n";
120 $logintouse =
'firstadmin';
122 $logintouse = $user->login;
125 print
'<u>'.$langs->trans(
"FileToLaunchCronJobs").
':</u><br>';
127 $pathtoscript =
'/pathtoscript';
132 $file = $pathtoscript.
'/scripts/cron/cron_run_jobs.php '.(!
getDolGlobalString(
'CRON_KEY') ?
'securitykey' :
'' .
getDolGlobalString(
'CRON_KEY')).
' '.$logintouse.
' [cronjobid]';
133 print
'<textarea class="quatrevingtpercent">'.$file.
"</textarea><br>\n";
139 if (preg_match(
'/^win/i', PHP_OS)) {
142 if (preg_match(
'/^mac/i', PHP_OS)) {
145 print $langs->trans(
"Note").
': ';
147 print $langs->trans(
"CronExplainHowToRunUnix");
149 print
'<textarea class="quatrevingtpercent">*/5 * * * * '.$pathtoscript.
'/scripts/cron/cron_run_jobs.php '.(!
getDolGlobalString(
'CRON_KEY') ?
'securitykey' :
'' .
getDolGlobalString(
'CRON_KEY')).
' '.$logintouse.
' > '.DOL_DATA_ROOT.
'/cron_run_jobs.php.log</textarea><br>';
151 print $langs->trans(
"CronExplainHowToRunWin");
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
cron_prepare_head(Cronjob $object)
Return array of tabs to used on a cron job.
cronadmin_prepare_head()
Return array of tabs to used on pages to setup cron module.
dol_print_cron_urls()
Show information with URLs to launch jobs.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
ajax_autoselect($htmlname, $addlink='', $textonlink='Link')
Make content of an input box selected when we click into input field.
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.