Problem Cron-Job using Python-Script

Andreas Penzel mail at andreas-penzel.de
Wed Apr 23 11:19:48 CEST 2003


"Andreas Penzel" <mail at andreas-penzel.de> schrieb im Newsbeitrag
news:b7jeem$1l5i0$1 at ID-69142.news.dfncis.de...
> Hello!
>
> I have a Python-Script to create Log-Files und work with them.
> Very well.
> But if I start the Script with Cron it works not correct.
> I often use os.system() to send commands to the shell including paths from
> the os.
> Could this be the problem?
> And if, how to solve?
>

I think it happens here:

os.system("iptables -L -v > /path/logfile.txt")

The file logfile.txt in /path is after running the script empty.
Is there a other way to become the result from iptables -L -v in a file?

- Andreas








More information about the Python-list mailing list