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 = 'firstname.lastname@example.org'; $titulo = 'Prueba cron'; $mensaje = 'Cron correcto'; $cabeceras = 'From: email@example.com' . "\r\n" . 'Reply-To: firstname.lastname@example.org' . "\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!