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
Post a Comment