You are here: Re: Loading Web pages with Cron Jobs « HTML « IT news, forums, messages
Re: Loading Web pages with Cron Jobs

Posted by Benjamin Niemann on 10/17/73 11:58

Hello,

smallfrythetall@gmail.com wrote:

> Ok, I run a online browser based game, and I need to do nightly resets
> (revives everybody and some other things) and they only think I have
> for that is Cron jobs. I wrote a .php file that updates my database
> when loaded. need to get it to load automaticly...any help?

If you have full (SSH) access to the (Linux/UNIX) server, you can use the
CGI version of PHP to run the script directly, something like a file

#!/bin/sh
/usr/bin/php /path/to/script.php

in /etc/cron.daily/
'man cron' will give you more details for your specific system.

The script should then either be password protected (so other people cannot
run it) or be outside of the document root.

If your access to the server is limited (e.g. shared host), you might have
some kind of (web)interface to setup cron jobs (this depends on your
hoster).

If the CGI version of PHP is not available, you could also use wget/lynx/...
to run the script on the webserver, e.g.:

wget http://LOGIN:PASSWORD@www.example.com/path/to/script.php

This will also work, if you cannot setup cronjobs on the webserver itself,
but on a machine at home/office/...

If you are talking about Windows systems... Sorry, cannot help you then.


Greetings

--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация