cron Archives | Codeexecute

how to set cron job on hostgator server?

  1. Create a file :
  2. write following code in your file :
    mail(“”, “test email”, “test message”);
  3. Now open your server cpanel and find advanced setting :
    (Cron setting)
  4. Now add new cron job and set followingcommand with your script.

          php -q absolutePath/my-script.php