I would like to know how can I determine if a python script is executed from crontab?
I don't want a solution that will require adding a parameter because I want to be able to detect this even from an imported module (not the main script).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…