Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have Centos 6.2, kernel 2.6.32-220.23.1.el6.x86_64 installed. I want to execute the script with user root cron .The script open browser in backend and render some value.
If I am running the script on shell it runs fine but if I run with user root crontab it doesn't run. i am using absolute path in the script but didn't work and defined path for JAVA_HOME, PATH, DISPLAY in script itself but didn't work. what need to be done to execute with crontab. Below is the script and crontab entry.
Cron doesn't have access to the display unless you are logged in. If you are not logged in, no display, and the program will error out. If someone is logged in other than root, no display, and again the program will error out.
Anything X will need the magic-cookie of the user that started X.
And if we're talking about a chroot environmnet it'll need a lot more than that. Still not a good idea to do with cron. It's probably easier to write out a log file and tail -f /the/log/file in a terminal for anyone monitoring the "alerts".
Can you provide some log output? How about the cron logs, messages, X11 stuff to start with. Something concrete for us to go on. Heck, throw a -x in your shebang line and let it run so we can see the output in the cron log.
I am attaching emails with strace results with cron and manually. Please check the strace results with cron file filename ( running with cron ) and manually with script filename ( running manually ). Please check if the information is sufficient to diagnose.