Re: Emulate(?) the crontab

Jens Knoell <[email protected]>
Newsgroups org.kernel.vger.linux-admin
Message-ID <[email protected]>
Hi Mario

On 01/09/2007 12:33 PM, Mário Gamito wrote:
> Hi,
>
> I have this blog agregator in http://www.planetgeek.org
>
> The agregator software must run a one line command every 15 minutes to 
> rebuild the index.html of the site.
>
> The command is
> #planet.py geek/fancy/config.ini
>
> I wonder if there could be written a script (bash, perl, python), that 
> *without crontab* could run the command I need.
Yes and no. You could - depending on the hosting solution - write a 
script that runs in an endless loop and does a sleep() and set it as a 
background process. The big issue there is that a server reboot will 
kill that process. There are sneaky ways around that, like for example 
checking if the process is running - each time a user hits your page, a 
script launches to see if the endless job is running. If not - restart it.

Alternatively if you have shell access you can run a timed process on a 
different machine which for example uses SSH to hop on to the host, runs 
the process and backs off. If you have a server or 24/7 machine at home 
for example that would work just fine.

Either solution would be reasonably feasible.

Jen
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.