Be reminded that the route is not a physical file. If your own standalone file is cron.php, you need to use cron.php?.. If you want to use route (e.g. Cron?..), you need to add a route using the Route_Action server event (see Server Events).
Be reminded that the route is not a physical file. If your own standalone file is cron.php, you need to use cron.php?
Thanks arbei.
As you can see, my cron file is generated as a custom file. It can be called with a route. In fact, if I call “Cron?action=importCSV” it works. The problem is the parameter is lost if I call from Login->page_terminate. (see case 9 in my first post).I will try if I can make some test with the Route_Action server event to call it from page_terminate
The problem is the parameter is lost if I call from Login->page_terminate
Press F12 in your browser, go to the Network panel, find the request to your custom file, check Headers → Request Headers, see if contains your URL parameter. See View HTTP headers for more information.
Solved adding the code to pageRedirecting in Login:
public function pageRedirecting(&$url)
{
// Example:
//$url = "your URL";
$levelid = CurrentUserLevel();
switch ($levelid) { //current user level
case -2: //if Anónimo
$url = "login";
break;
case 1: // if JdO
$url = "PartesJdoList";
//break;
case 2: // if admon_partes
$url = "PartesJdoList";
break;
case 3: // if Operario
$url = "ParteTrabajoList";
break;
case 4: // if manager
$url = "PartesJdoList";
break;
case 5: // if jefe equipo
$url = "ParteTrabajoList";
break;
case 6: // if Orange
$url = "OrangePlaniView2List";
break;
case 7: // if PRL
$url = "PlanificacionCal";
break;
case 8: // if Refuerzos
$url = "HorasTotalesRefuerzo";
break;
case 9: // if Cron
$url = "Cron?action=" . $_GET["action"];
break;
default: // timecard users, all others
$url = "login";
}
}