我想知道如何确定是否从crontab执行python脚本?
我不想要一个需要添加参数的解决方案,因为我希望能够从导入的模块(而不是主脚本)中检测到这一点.
python unix terminal cron
cron ×1
python ×1
terminal ×1
unix ×1