I need to run a php script at the scheduled time daily to update some fields in database and to send automated email. How I can do this?
Is it possible to write so
PHP cannot run script by itself,since php doesn't have daemons like python !! So you have to take OS help to invoke your custom script .
For example in linux : (example.sh) export USE_PHP=php cd $SCRIPT_ROOTDIR $USE_PHP -f cronfile.php service="checkdatabase" (service is the parameter passed to your cronfile).
For setting up cron jobs ,have a look at this link http://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/