- Create a file :
- write following code in your file :
mail(“email@example.com”, “test email”, “test message”);
- Now open your server cpanel and find advanced setting :
- Now add new cron job and set followingcommand with your script.
Â Â Â Â Â Â Â Â Â php -q absolutePath/my-script.php