K
K
kuzmenko_alex2014-04-24 23:16:15
Python
kuzmenko_alex, 2014-04-24 23:16:15

How to hang a python script on cron?

There is a python script. The file is executable.

#!/usr/bin/env python3
import os, re, sqlite3, requests
...

I set up cron like this
crontab -l:
SHELL=/bin/bash
MAILTO=****@****
* * * * * /home/alex/projects/script/script.py

But the script doesn't run. What could be the problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
lega, 2014-04-24
@kuzmenko_alex

Add path to cron

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

N
nivs, 2014-04-24
@nivs

$ chmod +x /home/alex/projects/script/script.py
?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question