docker - Logs not showing up in google cloud console when running cron jobs in GKE -


#assume have ubuntu, selenium , chrome driver in image  add crontab /etc/cron.d/simple-cron # add crontab file in cron directory add crontab /etc/cron.d/simple-cron  # add shell script , grant execution rights  run wget myjava.jar [from central repository] run chmod +x /myjava.jar   add script.sh /script.sh run chmod 777 /script.sh  # give execution rights on cron job run chmod 0644 /etc/cron.d/simple-cron  # create log file able run tail run touch /var/log/cron.log   add run.sh /run.sh run chmod +x /run.sh cmd ["/run.sh"]    crontab: * * * * * root /script.sh  script.sh: export display=:99 cd / /usr/bin/java -jar myjava.jar   run.sh: #!/bin/bash xvfb :99 -screen 0 1024x768x16 & cron -f  

i using above mentioned dockerfile, have cron job run every minute. don't see logs getting captured in google cloud console.

i see similar post discusses similar problem. don't see solution. google container engine stdout logs not showing up

i cannot move cron script entry point in docker file. please let me know how redirect logs google cloud console when running cron jobs.

i ran same problem , couldn't find way cron output anything. workaround, can add &> /proc/1/fd/1 crontab entry , output script logged.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -