How to write a basic PHP mail script

<?php
$name = “Web Guy”;
$email = “sender@emailaddress.com”;
$recipient = “recipient@emailaddress.com”;
$mail_body = “This is the email text”;
$subject = “This is the email subject”;
$header = “From: ” . $name . “<” . $email . “>\r\n”;
mail($recipient, $subject, $mail_body, $header);
?>

How to write a basic cron job on a unix / linux server running apache

Cron Job is a Unix/Linux command that automates tasks. It works well to automate PHP Scripts.
Cron comes from the word Chronology.
Crontab Format
minute hour day month weekday command
30 22 15 1 * /home/user/script.php
The command above runs script.php at 10:30pm on 15th January.
An asterisk in any field means all values so 0 18 * * * /script.php [...]