run script as service
I have linux machine, where printer is configured. some time it goes down automatic.
I need to make script, which should work like service.
I have prepared script, which checks by cron every 30 minute.
but I am looking service, which send me mail, when printer goes down. and enable itself.
I would recommend leaving it as a cron job. The only difference would be that you'd be putting some form of infinite loop in the script itself, which has no benefit other than higher time resolution, i.e. you can run it more than once a minute. If it crashes or hangs though, you won't know and it won't do anything. If it's a cron job it starts every minute, 30 minutes etc, so the logic is much easier and more reliable.
there is nothing magical about a "service"... it's just whatever you want it to be.
|All times are GMT -5. The time now is 01:10 AM.|