run_multiple_jobs.py 344 B

12345678910111213141516171819
  1. from datetime import datetime
  2. from jobs import analyze, clear_wal
  3. from util import main_wrapper
  4. @main_wrapper
  5. def main():
  6. schedule = [
  7. analyze,
  8. clear_wal,
  9. ]
  10. for job in schedule:
  11. print('Starting', job.__name__, datetime.now().strftime("%H:%M:%S"))
  12. job.run()
  13. if __name__ == '__main__':
  14. main()