Skip to content Skip to sidebar Skip to footer

Raspberry Pi Crontab Starts Py Script At Bootup -> Logging: Error Mysql 2002 (can't Connect To Local Server)

A Raspberry Pi (raspian wheezy) has a cronjob, created as user pi with 'sudo crontab -e' so it should has root grants. ps aux | grep /home/.../myscript.py ...say it's owner is u

Solution 1:

solved the problem in quite ugly way, but it's working now.

Just added:

time.sleep(5)

before trying to connect to mysql db.

I would be pleased if someone has a better solution.

Post a Comment for "Raspberry Pi Crontab Starts Py Script At Bootup -> Logging: Error Mysql 2002 (can't Connect To Local Server)"