Firebird News

Wednesday, February 08, 2012

php shell script that will run runs at specific hour with crontab and send emails with the html form extracted content


Here is how to create a daily crontab script that runs at specific hour 
gets the web content and then saves the output in a file folder (the form must use a sumbit button with post) and then 
it send email with the html file 

you need to install php5-cli , php-pear 
sudo apt-get install php5-cli php-pear

and then from pear Mail , Mail_Mime http://pear.php.net/package/Mail_Mime/redirected

sudo pear install Mail_Mime
sudo pear install Mail

crontab -l

# m h  dom mon dow   command
0 1 * * * /home/ubuntu/curl_cron.php


cat /home/ubuntu/curl_cron.php


No comments: