Issues Setting Up Cron in Onion Omega [Resolved]

  • Trying to figure out the reason(s) a script is not running properly.

    Set a shell to call a *.py file every minute with the following:


    */1 * * * * /root/


    The runs a *.py file which checks an I2C temperature module and sends the results to Ubidots. It works fine manually. Tried restarting Cron and a few other variations such as adding sh to it.

    The file has the following properties (also tried chmod a+x, u+x, 755, 666 and others):

    -rwx------ 1 root root 62 Jul 21 15:07

    Checking logread indicates that cron it running:

    Fri Jul 21 15:38:00 2017 crond[3464]: USER root pid 3491 cmd /root/
    Fri Jul 21 15:39:00 2017 crond[3464]: USER root pid 3493 cmd /root/
    Fri Jul 21 15:40:00 2017 crond[3464]: USER root pid 3495 cmd /root/
    Fri Jul 21 15:41:00 2017 crond[3464]: USER root pid 3497 cmd /root/
    Fri Jul 21 15:42:00 2017 crond[3464]: USER root pid 3499 cmd /root/
    Fri Jul 21 15:43:00 2017 crond[3464]: USER root pid 3502 cmd /root/

    Cron works fine on another Omega2+, so confused as to why it's not working or in this case generating any output.

    Message in Test.log file:

    -ash: crontab.txt: not found

    The crontab.txt is listed in /etc/crontabs as root (file).

    Any ideas on what to try next? Just don't won't to have a script running in an infinite loop after startup.

  • Used crontab -e to edit crontab and removed the ^M which were preventing it from running successfully. Think they were either inserting through a copy&past or through the console.

    Now, it's time to get some rest.

Log in to reply

Looks like your connection to Community was lost, please wait while we try to reconnect.