I want to execute a script at startup using rc.local. For this I use the following file:
#!/bin/sh -e /usr/bin/python /public/test.py& exit 0
This testfile should write something into another file, just for test purposes. And not even that works. But if I write something like
echo "some test output" >> /public/rc.log
everything works fine and I get an additional line.
UPDATE: I also tried crontab, where I did the following
First I typed
@reboot /usr/bin/python /public/cron.py. In this file I wrote
with open("rc.log", "a") as f: f.write("Hello, cronjob\n") f.close()
But also: Nothing happens.