How to properly structure a python cron script for single instance execution -
this related another question here.
i want create series of cron scripts, cron scripts can have 1 instance each. need implement lock files each script. decided create abstract cron class create lockfile on __init__
, destroy on __del__
. approach has proven incorrect getting unpredictable results __del__
method.
it has been requested open new question asking how implement this. best approach here? 1 cron script check email, checks database, , forth.
my reasoning behind using cron don't trust myself build monolithic daemon 1 script. can't afford have entire daemon breakdown if 1 unrelated part stops working. perhaps unwarranted fear proper implementation?
Comments
Post a Comment