http://www.perlmonks.org?node_id=1205317


in reply to Efficiency of indoor grow light timer

I want to thank those who mentioned putting this into a crontab; I thought of that, along with the benefits and drawbacks extensively.

The reason I don't want to do that, is because I wanted this to be self-contained Perl, without relying on system resources (so to speak in this sense).

The event that is run to enable/disable the light relies heavily on the API behind this Dancer2 application, and I didn't want to have to mess around trying to load code from an external process. Although the code that does run it is indeed external (ie. it runs in a separate proc started with Async::Event::Interval), it's all within the Dancer2 application framework itself, and I was hell-bent on keeping it that way.

If I could not get it to work the way I needed it, cron was definitely an option, but alas, a very, very last resort.

Cheers,

-stevieb