|
Re: [heyu_users] How to simulate the CM11a?
Instead of running cron every minute to check for events (which seems
rather silly) why not just schedule jobs in cron to happen ... when
they're supposed to occur?
From your description, I can't figure out why you wouldn't just set up a
cron job for each event you want to trigger.
If the CPU powering off is an issue, you may want to look into "anacron."
As for your question about mail, your MSA is more important than your MTA,
unless you're figuring on writing raw SMTP. Before we get all mixed up in
acronyms, most *nix mail systems have "sendmail" as a command line MSA,
whether or not the MTA sendmail is involved, so it's de rigeur to use that
from the command line.
So ultimately, I'm not sure if your question is "how do I send mail from
the command line" in which case you'll want to consult whatever you have
installed that can function as an MSA, or "how do I launch a script when
an event occurs?" which is more a function of heyu.
> I have a CM11a that appears to be flakey...it will transmit x10 commands
> passed to it via Heyu, but uploaded timers do not appear to run. I've
> tried timers uploaded from heyu as well as active home with the same
> result. This is the third time a CM11a has died. I would like to, in
> essense, replicate the timer execution within Heyu, and send the outputs
> to either the CM11a or the firecracker module. There seems to be enough
> 'pieces' of things in Heyu to do this but I am not sure how to put it
> together, so here are some questions:
>
> The thing that seems to be missing is a time sequencer - for every min
> tick, check a list of time events and if the time matches, execute the
> associated action. Is there any piece in Heyu that does this? If not,
> any suggestions on how to implement this? I considered developing a
> crontab but running something with a granularity of one min might chew up
> a lot of cpu cycles. If someone has done this or knows of an example,
> could you show it to me?
>
> I realize the possibility of a power fail effictively killing the CPU, but
> I can make sure that does not happen, and be sure that it is more reliable
> than the CM11a.
>
> Also, I am looking for an example on how to send an email message as an
> action to an event happening. I am using the Courier MTA as my mail
> server.
> Thanks
> John
|