Skip to content

Instantly share code, notes, and snippets.

@wiljdaws
wiljdaws / scheduler.py
Created August 4, 2023 23:41
scheduler to run tasks
import time
import logging
import schedule
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(message)s", datefmt="%Y-%m-%d %H:%M:%S")
class AdvancedScheduler:
def __init__(self, start_time, end_time, interval):
self.start_time = start_time
self.end_time = end_time
#!/usr/bin/env python3
import re
import csv
error_count = {}
user_statistics = {}
with open('syslog.log') as file:
for line in file: