35 global $langs, $conf, $user;
39 $head[$h][0] =
dolBuildUrl(DOL_URL_ROOT.
'/cron/admin/cron.php');
40 $head[$h][1] = $langs->trans(
"Miscellaneous");
41 $head[$h][2] =
'setup';
44 $head[$h][0] =
dolBuildUrl(DOL_URL_ROOT.
'/cron/list.php', [
'mode' =>
'modulesetup']);
45 $head[$h][1] = $langs->trans(
"Module2300Name");
46 $head[$h][2] =
'jobs';
65 global $langs, $conf, $user;
70 $head[$h][1] = $langs->trans(
"CronTask");
71 $head[$h][2] =
'card';
75 $head[$h][1] = $langs->trans(
"Info");
76 $head[$h][2] =
'info';
93 global $conf, $langs, $user;
98 $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
102 print
'<div class="div-table-responsive-no-min">';
103 print $langs->trans(
"URLToLaunchCronJobs").
':<br>';
106 'userlogin' => $user->login,
108 $url =
dolBuildUrl($urlwithroot.
'/public/cron/cron_run_jobs_by_url.php', $query);
109 print
'<div class="urllink">';
110 print
'<input type="text" id="publicurlmember" class="quatrevingtpercentminusx" value="'.$url.
'">';
111 print
' <a href="'.$url.
'" target="_blank" rel="noopener noreferrer">'.
img_picto(
'',
'globe').
"</a>\n";
113 print
'<br> '.$langs->trans(
"OrToLaunchASpecificJob").
'<br>';
114 $query += [
'id' =>
'cronjobid'];
115 $url =
dolBuildUrl($urlwithroot.
'/public/cron/cron_run_jobs_by_url.php', $query);
116 print
'<div class="urllink">';
117 print
'<input type="text" id="publicurlmemberall" class="quatrevingtpercentminusx" value="'.$url.
'">';
118 print
' <a href="'.$url.
'" target="_blank" rel="noopener noreferrer">'.
img_picto(
'',
'globe').
"</a>\n";
126 $logintouse =
'firstadmin';
128 $logintouse = $user->login;
131 print
'<u>'.$langs->trans(
"FileToLaunchCronJobs").
':</u><br>';
133 $pathtoscript =
'/pathtoscript';
138 $file = $pathtoscript.
'/scripts/cron/cron_run_jobs.php '.(!
getDolGlobalString(
'CRON_KEY') ?
'securitykey' :
'' .
getDolGlobalString(
'CRON_KEY')).
' '.$logintouse.
' [cronjobid]';
139 print
'<textarea class="quatrevingtpercent">'.$file.
"</textarea><br>\n";
145 if (preg_match(
'/^win/i', PHP_OS)) {
148 if (preg_match(
'/^mac/i', PHP_OS)) {
151 print $langs->trans(
"Note").
': ';
153 print $langs->trans(
"CronExplainHowToRunUnix");
155 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>';
157 print $langs->trans(
"CronExplainHowToRunWin");
if(! $sortfield) if(! $sortorder) $object
global $dolibarr_main_url_root
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, $allowothertags=array())
Show picto whatever it's its name (generic function)
dolBuildUrl($url, $params=[], $addtoken=false)
Return path of url.
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.