Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert to daemon process, instead of cron job #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nshn
Copy link

@nshn nshn commented Nov 11, 2013

I have changed the code, to be run as a daemon process instead of cron job. As it was mentioned in the README file, it can be run every 1 or 5 minutes typically; therefore I have used 60 seconds sleep time between its runs. The second part of the program, which is listening on sockets, is repeated forever (with 60 seconds delay), and the first part of the program which is reading configuration file, is only done one time, initially. If there is some exception in the first part (reading configuration file), the exception is catched, and it does not enter the second part “listening on socket connection” {it gives “Failed to read configuration file” message.}; Therefore, the second part is only repeated when there has been no exception in the first part. This way, unnecessary repeating of the second part (when the first part has exception) has been omitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants