To create a cron job that runs every 5 minutes and executes your Python script, follow these steps:
Save the Python script you provided into a file, for example daily_commit.py
.
Change the file permissions to make the script executable.
chmod +x /path/to/daily_commit.py
Open your crontab file for editing by running the following command in your terminal:
crontab -e
Add the following line to the crontab file to run the script every 5 minutes.
*/5 * * * * /usr/bin/python3 /path/to/daily_commit.py
Make sure to replace /usr/bin/python3
with the path to your Python interpreter if it's different, and /path/to/daily_commit.py
with the actual path to your script.