Forum Moderators: coopster
and it said
30 23 * * * /home/username/www/cgi-bin/members.cgi
when i create a cron job with above line, this members.cgi will execute everyday at 11:30..
Now my doubt is like members.cgi can i run myfile.php also ?
in which i will be sending email to all my members. lets say myfile.php is at http://www.example.com/pqrs/abc/myfile.php
How can i schdule this myfile.php as a cron job
30 23 * * * /home/username/www/pqrs/abc/myfile.php
will it serve my purpose ?
please let me know
[edited by: dreamcatcher at 6:13 pm (utc) on May 29, 2008]
[edit reason] use example.com. Thanks. [/edit]
You need to use php interpreter as follows:
30 23 * * * /path/to/php -f /home/username/www/pqrs/abc/myfile.php
You have to find the directory where it is. Try /usr/bin
>> what is this -f and what it will do
It specifies that you running a file, where the filename comes after it.
>> in case i want to stop this cron
You can remove that line from your crontab file, or you can comment it out with the pound symbol (#).
It would look like the following, then:
#30 23 * * * /usr/bin/php -f /home/username/www/pqrs/abc/myfile.php #commented out