Best practices for scheduling multiple jobs at different frequencies in a Python project?

137 views Asked by At

I have started scheduling a couple scripts in Python using launchd. All my imports are from the root directory, though, so unless I want to mess with sys.path (which feels like poor practice) I need to put this scheduled script in my root directory.

There are a few other scripts I want to automate, too, at varying frequencies (one hourly, one daily, etc.).

So right now, it seems like my two options are:

  1. Filling up my root directory with scheduled scripts (clean sys.path, ugly project organization)
  2. Storing scheduled scripts in a subfolder, but editing sys.path in each one (ugly sys.path, clean organization)

Is there a better alternative? Both of these seem to be suboptimal solutions. Thanks in advance for any help/advice!!

0

There are 0 answers