Categories
Python Answers

How to execute Python script via crontab?

Spread the love

Sometimes, we want to execute Python script via crontab.

In this article, we’ll look at how to execute Python script via crontab.

How to execute Python script via crontab?

To execute Python script via crontab, we can edit the crontab file to add an entry to run the script.

For instance, we add

*/10 * * * * /usr/bin/python script.py

to run script.py every 10 minutes.

Conclusion

To execute Python script via crontab, we can edit the crontab file to add an entry to run the script.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published.