Help - Search - Members - Calendar
Full Version: About Corn
Linuxhelp > In The Community > General Discussion
Aminul
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.
markjr
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
DS2K3
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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.