cronnitrousio

Getting Crontab to work on Nitrous


I am quite new to nitrous and programming in general. However, I wanted to see why my crontab job isn't doing anything on Nitrous.io.

I am using a virtualenv and I am in the understanding that you can run them on crontab. THis is my cronline:

10 6,19 * * * /home/action/susteq/bin/activate /home/action/susteq/start.py 2>&1 >>     /home/action/susteq/log/start.log     

Solution

  • Crontab should work on Nitrous.IO as long as you are actively logged into the box (or using tmux) and the box doesn't shutdown from inactivity. Paid boxes will stay running indefinitely.

    Looking at this command you may want to ensure it runs as expected outside of the crontab. Try running the process first:

    $ /home/action/susteq/bin/activate /home/action/susteq/http://start.py 2>&1 >> /home/action/susteq/log/start.log
    

    If not then you may actually want to try placing 2>%1 at the end of the line (further explained on this redirection tutorial). The following command may be what you are looking for:

    $ /home/action/susteq/bin/activate /home/action/susteq/start.py >> /home/action/susteq/log/start.log 2>&1
    

    If that works, try adding it to your crontab:

    $ 10 6,19 * * * /home/action/susteq/bin/activate /home/action/susteq/start.py >> /home/action/susteq/log/start.log 2>&1