Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ General Discussion _ About Corn

Posted by: Aminul Jul 8 2006, 11:23 PM

Hi,
i m a new member of this forum. i would like to know about Automatic running a php page in server. Simply i need to run a PHP script in server everyday at 12:00 PM. how shall i do this. Pls help me. For more i don't found /etc folder in my ftp. i m not sure my server have corn support or not. pls let me know what shall i do now.

thanks.
aminul
junior programmer(php,mysql)
bGlobal sourcing.com
Bangladesh.

Posted by: markjr Jul 9 2006, 12:44 AM

QUOTE (Aminul @ Jul 9 2006, 12:23 AM) *
Hi,
i m a new member of this forum. i would like to know about Automatic running a php page in server. Simply i need to run a PHP script in server everyday at 12:00 PM. how shall i do this. Pls help me. For more i don't found /etc folder in my ftp. i m not sure my server have corn support or not. pls let me know what shall i do now.

thanks.
aminul
junior programmer(php,mysql)
bGlobal sourcing.com
Bangladesh.


You mean cron?

Pretty well every system will have it, you need to edit your crontab files, something like

# crontab -e

and then in that file put an entry like

0 12 * * * /usr/bin/lynx -dump http://localhost/yourscript.php

it probably the easiest thing to do, without getting into a discussion over whether its the most efficient way to approach it (over running the script as a php command line script)

See your man pages for "crontab" and "crond"

-mark

Posted by: DS2K3 Jul 9 2006, 07:34 AM

If you are on a shared server, then you may well not have access to CRON, in which case you won't be able to schedule tasks on the server itself. You could schedule a task on your local computer to fetch the PHP page though.

D

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)