Skip to content

Commit

Permalink
Update routine_tasks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sondregronas committed Jul 28, 2024
1 parent 249e030 commit fb52887
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions BookingSystem/routine_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,16 @@ def _task(job_func):
logger.error(e)

def run_mon_to_fri_at_time(job_func, at_time):
func_name = job_func.__name__
job_func.__name__ = f'{func_name} (Mandag)'
schedule.every().monday.at(at_time).do(job_func)
job_func.__name__ = f'{func_name} (Tirsdag)'
schedule.every().tuesday.at(at_time).do(job_func)
job_func.__name__ = f'{func_name} (Onsdag)'
schedule.every().wednesday.at(at_time).do(job_func)
job_func.__name__ = f'{func_name} (Torsdag)'
schedule.every().thursday.at(at_time).do(job_func)
job_func.__name__ = f'{func_name} (Fredag)'
schedule.every().friday.at(at_time).do(job_func)

__routine_backup = lambda: _task(_routine_backup)
Expand Down

0 comments on commit fb52887

Please sign in to comment.