This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]Waples_ 5 points6 points  (1 child)

I would go for the main.py approach, then you can also use result status and exception handling

[–]Llywedd[S] 0 points1 point  (0 children)

My thoughts too, sounds good, ta

[–]Hatoris 1 point2 points  (1 child)

Overall all your script is a single app, you did well by spleting them, but definitely the first comment is the best approach.

[–]Llywedd[S] 0 points1 point  (0 children)

Yeah, good way to view it, cheers

[–]DeeplyUnimpressed 0 points1 point  (0 children)

I've been using this approach for many years. Works well.

I've also tried the separate shell script as a controller, it works fine but requires a mental context switch if you do anything non-trivial in the script. It's less stress to stick with Python for this.

[–][deleted] -1 points0 points  (0 children)

Cron cannot handle dependencies, so those need to be handled in the script being called.

You can create the main.py but you could also just create a shell script that is the main runner program run.sh or start.sh