Page 1 of 1
Auto Execution of PHP Code
Posted: Thu Apr 27, 2006 7:45 am
by waqas_punjabian
Hi everyone here,
i am working on a job portal, here i want a functionality,
My php code should send jobs as an email to the registered users AUTOMATICALLY at every weekend.
How can i do that ?
thanks n regards
WAQAS
Posted: Thu Apr 27, 2006 8:03 am
by JayBird
Scheduling jobs
Posted: Thu Apr 27, 2006 1:13 pm
by manjeet
hi , Scheduling can be done using cron job ...
create a file like task_schedular.php
list all the processes to be executed in this file
add this file to the cron job
Posted: Fri Apr 28, 2006 3:38 am
by dibyendrah
First create the email sending script and put somewhere ex : /var/www/html/send_email.php
* * * * * command_to_be_executed
| | | | |
| | | | |_ day of the week (0-6)
| | | |__ month(1-12)
| | |____ day of the month(1-31)
| |______ hour(0-23)
|________ minute(0-59)
To add the cron job just go to terminal and use following command :
After that add the following line if you wish to send email at 11pm every night :
Code: Select all
0 23 * * * /usr/bin/php -q /var/www/html/send_email.php
Hope this might help in some extent.
Cheers,
Dibyendra