Search code examples
pythoncroncron-task

What will __name__ be when python script run from crontab?


The question says it all. If I have a cronjob that runs a python script, what will the value of __name__ be?


Solution

  • The same as if you run it directly from your shell. There is no difference between running it from your shell or from the crontab.