Skip to content

Commit

Permalink
Add logging statements to display user count and welcome message
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaoborui committed Mar 12, 2024
1 parent eba22f5 commit 8183ce9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion wzxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ def nightSign(self):
def runUsers():
with open('users.toml', 'r') as file:
data = toml.load(file)['user']


# show the count of users
logging.info(f"Running {len(data)} user(s)...")

for i, userData in enumerate(data):
if i != 0:
print("-" * 50) # Separator between different users
Expand All @@ -223,6 +226,9 @@ def runUsers():
# Create a cron iterator
cron = croniter(cronExpression)

# Log the welcome message
logging.info("Welcome to Wozaixiaoyuan Night Sign-in Script!")

# Infinite loop to check if it's time to execute the task
while True:
# Get the next scheduled time
Expand Down

0 comments on commit 8183ce9

Please sign in to comment.