python script as centos service

Task completed! I made a vkontakte Bot which delete all comments are not from group members! But I do not want to run it by cron, because it will SPAM all my system with cron emails. But I found resolution: make a worker.py allow worker to run delete scripts on time periods add worker as centos service have fun! Maybe later I’ll add more code, but now just for example I’ll show only worker and bash script: #!/usr/local/bin/python3 # coding=utf-8 from time import strftime, sleep import schedule from vk_del_comments import * from vk_del_comments_older import * import os pid = os.getpid() op = open(“/var/us.pid”,”w”) op.write(“%s” % pid) op.close() token = ” tk_owner_id = “-000000000” tk_group_id = “000000000” tk_domain = “group_domain” curr_date =Short Read more…