I recently created a hosting, uploaded my files, created a database and checked that everything works properly, but when tryed to set a cron job, it doesn’t execute my script.
My script is executed perfectly when visiting https://huerto.000webhostapp.com/alerta.php. It sends me a mail like I want, and it’s into public_html folder.
The code is:<?php $para = 'email@example.com'; $titulo = 'Prueba cron'; $mensaje = 'Cron correcto'; $cabeceras = 'From: firstname.lastname@example.org' . "\r\n" . 'Reply-To: email@example.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($para, $titulo, $mensaje, $cabeceras); exit; ?>
When trying to create a new cron job I set it like that, but this doesn’t work.
Thanks for the help!