[ale] Re: [ALE] file system trigger
hirsch at zapmedia.com
hirsch at zapmedia.com
Fri Feb 22 12:49:33 EST 2002
Greg Sabino Mullane writes:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> > What they want is for a job to sleep and then wakeup every so often.
> > Is there to signal a job to run whenever a file appears in a directory.
>
> Worse case scenario, you could make another script to monitor the
> first one, on the theory that it may survive what kills the first; or
> you could just sneak your watchdog script into an existing cronjob somehow.
> Heck, you could even have the script issue periodic "at" commands... :)
Or you could just use /etc/inittab. Create your monitoring program an
has it run out of inittab. Set it to respawn if it dies.
This is ugly, but it would work about as well as cron. Even cron is
clumsy compared to a file notification system, but I don't think we
have one.
A very advanced solution is to use one of the use level file systems.
The "directory" could really be a process that could do anything it
wanted when a file gets written to it. I've done this with files
using named pipes, but I don't know how to do it with directories.
I suppose you could also hack your ftp server to do something at the
conclusion of a put command.
--Michael
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list