|
Can anyone help me? I just need to call a php script from my server once in a hour on every day. I know that i can do i with a cronjob? Is that right? How do i manage to achieve this? |
|
Hi Shellscripter, To edit your cronjobs, execute this command:
Then you have two options. If your PHP script as executable rights (CHMOD 755), you should be able to simply call the script:
Just as reminder, the crontab format is: minute hour day month weekday command. So in this case we ask the cron to launch the script every week day, every day and every hour at HOUR:00 (08:00, 09:00, etc.). If you want more info about crontab, you can go here: http://unixhelp.ed.ac.uk/CGI/man-cgi?crontab+5. <p>Hi sebastien,
thanks for your help. Your piece of code isn't working out for me though. The problem is that the php script i want to open is located on an external server. How can i call it?
Thanks in advance!</p>
1
<p>Maybe using wget? </p>
<p>0 * <em> * </em> /usr/bin/wget -q -O /dev/null <a href="http://www.yoursite.com/path/to/script.php">http://www.yoursite.com/path/to/script.php</a></p>
<p>hey, works like a charme. Thanks!</p>
|
vim /etc/crontabenter the correct format |