Alan McKinnon <alan.mckinnon <at> gmail.com> writes:

> On 29/05/2015 18:12, Meino.Cramer <at> gmx.de wrote:

> > I am makeing definetly something very wrong here...but I the logic
> > seems to prevent me to do the rigth ting...

*cron* are limited. You need advanced logic constructs to achieve what you
want. Bash is most likely your easiest path.


> Sounds like a job for anacron. What you want to do is way outside what
> the various cron daemons were built to do.
> Here's how I would do it:
> Run a wrapper script once a day (you do not care when exactly). The
> wrapper script creates a state file every time it runs the job the says
> when it last ran. Each time the script starts, it checks this file and
> figures out itself if it needs to run now or not.


All good advice. There are many example scripts about time triggering and 
counting days to then trigger your desired script.  The construct to track
elapsed time that I use, is just a simple "accumulator". Once it is full
then you trigger your script and zero out the accumulator and start it
all over again.... There are many logic constructs that will do what your
want.   Just hack away!



When my mesos work is ready for other, there is a fantastic replacement,
call chronos [1] that will fit your needs nicely. Fortunately for embedded
guys like yourself, you'll be able to keep your cluster 'live' on milliwatts
of power on a small embedded board, then trigger relays or such to boot up
other boxes, as the cluster (down to a minimal embedded board) ramps ups to
server your needs. I'm making lots of progress; but the more I get working
the more I discover that I need other codes and modules.....

Maybe you can run the aforementioned anacron on one of your arm boards,
for now?


Maybe if you wrote your script in Haskell [2], one of the really smart guys
would help you debug and get it working (correctly?).....

Have Fun,
James


[1] http://nerds.airbnb.com/introducing-chronos/

[2] http://www.haskellforall.com/2015/01/use-haskell-for-shell-scripting.html



Reply via email to