Sometimes you need a script that operates over a long period of time (such as collecting or reporting counters) and behaves more like a system "daemon."
There are two approaches to making an on-box SLAX script provide daemon-like functionality:
- Schedule the script as a timer-driven event script, so that it is executed much like a cron job.
- Create a self-restarting script; one that causes a new copy of itself to be started when the current copy exits.
Learn what these approaches would look like and the pros and cons of each by reading:
Best Practices Series: Design Considerations for “Long-Lived” On-box SLAX Scripts