How do I have a python script that contains functions say function1, function2, and function3 that I want to execute every 24 hours as a separate process/thread? So say...
Main Application executes function1, function2 function1 and function2 executes some long running process in a separate threads from the main application once function 1 finishes its task, reports back to main application that it completed
Main application prints "Done with Function 1." once function 2 finishes its task, reports back to main application that it completed
24 hours after function 1 finishes... the main app will execute it again 6 hours after function 2 finishes... the main app will execute the function again
Note that the functions would be doing similar things, but the data source is different, so having separate apps and doing a cron is undesirable. Examples would be great.
import time?cronfor this? Is there something it can't do that you need? And, if so, have you considered other schedulers that can do it? Or are you running on some kind of embedded-Python-only system with no underlying OS? Or… what? "Having separate apps" isn't a real problem—separate apps can all share a module with all those "functions… doing similar things".