-2

I have a script (/home/user/script.sh):

#!/bin/bash
/usr/bin/python /home/user/program.py >> /home/user/logs/out.log &

and it is working. The output from the python script is written to the out.log file. Now I am adding the script to cron:

*/1 * * * * /home/user/script.sh

Restarting cron and nothing is written to the out.log file. Cron is running and executing the script every 1 minute.

Why it's not working?

1
  • Have you checked cron's log file?
    – Ryder
    May 24, 2016 at 11:29

1 Answer 1

0

The prefered way to do this is to use pythons logging module and write directly from inside the script instead of redirecting the output.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .