ruby on rails - Cron jobs using Whenever with VM, Docker & Dokku -
I have Ruby on Rails app in a Docker Container at Ubuntu 14.04. I have established my deployment using Doku, but I am sure how my cron jobs can work properly.
Currently I am using this which allows me to do something simple:
every 5.minutes runner 'MyModel.run_something' end The problem is that I think that every time I deploy using git push dokku master , it resets the container and decides it back by default I remove all my cron schedule.
Then I thought that cron scheduling should be done outside the container and VM Need to be on blood.
I do not currently see any cron jobs, even if I do. > ssh:
root @ dashboard: ~ # crontab -l No crossover for root I am very new to container virtualization so I apologize if I have left it on its important part but I am stumped.
I was taken forever to work on this, call the rail command through the cronat Please. I have also got a rail app uploaded on the Dakoku with Ubuntu on the Digital Sea Server whenever the gem is trying to work ... it's not just. When -i does not work
Whenever Doku does not actually create a new font encode for the environment, it is good to detect cron syntax!
So in this way I got the assignment to work in Doku ...
- Manually you
sudo crontab -ewhich will open it in vi / vim
You can use sudo crontab -r to delete it, or sudo crontab - to see the current cronat
- Add the following code to the new code
The code below is every 1 minute Will execute on.
SHELL = / bin / bash PATH = / usr / local / sbin: / usr / local / bin: / usr / sbin: / usr / bin: / sbin: / bin: / usr / games: / / Usr / local games * * * * / bin / bash -c 'dokku run Apshn name rail mymodel.run_something' Make your environmental variables that do have trouble env command
-
grep cron / var / log / syslogshooting to see the output log for . You may need to install postfix through>install sudo apt-get postfix "(Krone) can get information (no MTA installed, discardCronobose fails to work- View
cat / var / mail / rootif you see a mail from the error chron from - View
Hope this is useful for me to minimize Got it from!
Comments
Post a Comment