2

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     
user2164689
  • 395
  • 4
  • 13

2 Answers2

0

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
Greg
  • 1,589
  • 9
  • 14
  • I got the problem solved. It took a bit of time. Love Nitrous by the way. Really easy for starting developers also I can imagine... – user2164689 Nov 04 '14 at 12:17
0

Update: To run cron on Nitrous Pro you need to enable privileged mode on your container, which requires that you enable advanced container management. More details can be found here:

https://community.nitrous.io/docs/running-cron-on-nitrous

ajhit406
  • 1,405
  • 1
  • 14
  • 17