[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Planned execution of a script on a RAQ - AT not there ?
- Subject: Re: [cobalt-users] Planned execution of a script on a RAQ - AT not there ?
- From: Larry Smith <lesmith@xxxxxxxxx>
- Date: Mon May 10 05:14:04 2004
- Organization: ECSIS
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
On Monday 10 May 2004 06:56, Pizza Box manager wrote:
> >Subject: RE: [cobalt-users] Planned execution of a script on a RAQ - AT
> > not there ?
>
> From: Francisco Javier Fabra Caro <jfabra@xxxxxxxxx>
>
> >To: cobalt-users@xxxxxxxxxxxxxxx
> >Date: Mon, 10 May 2004 11:36:46 +0200
> >
> > > How about a PHP script run from CRON, checks the time, if it's nearly
> > > the trigger time then it does a sleep until its exactly the right time
> > > then sends the emails using some sort of remailer, otherwise it exits.
> > > Should be accurate to a few milliseconds!
> > >
> > > Phil
> >
> >Yeah!
> >
> >Or just try to make something like this idea, and when it's nearly the
> >exact time give the proccess a higher priority. With this you should
> >avoid situation like the case of have a high CPU use and your triggered
> >program trying to hardly execute something.
>
> Both suggestions look like a great theory but I cannot find a "down to
> earth" example in any of the forums I know.
> I do have a Perl script ready for the action, but am not sure how to make
> sure the server time is accurate, and especially give a job the highest
> priority ?
>
I guess I am missing something here. Cron still works on Cobalts just like
any other "nix box - you can set jobs to run at any time you desire. Note
the last line of /etc/crontab - which runs swatch every 15 minutes. Simply
build a crontab (or modify it) to do the job (run your perl script) at the
time you desire.
As for syncing the time, start ntp (/etc/rc.d/init.d/xntpd) which will sync
the time with a network time server (there are loads out there) and make sure
your box is accurate with the rest of the net. I run it on all my servers so
that I know a report/email dated a certain time is the same "time" for all
servers.
--
Larry Smith
SysAd ECSIS.NET
sysad@xxxxxxxxx