Let's say I have a small "Hello World" Java program compiled in my home directory. I can run it with java helloWorld
from my home directory and it executes without any problem.
Now I need to schedule to execute this program let's say after 10mins from now. So, I am executing following commands on console:
at now+10min
warning: commands will be executed using /bin/sh
at> java helloWorld
Press CTRL+D to finish
So it is scheduled properly as I can see it with at -l
command. But at this time nothing happens.
Why? What is wrong with it? Because, if instead of scheduling the execution my own program I schedule executing of gedit command it opens it at a specified time. But with my own program it doesn't perform anything. How can I change the situation?
crontab
, you are able to see the output of the command you added. Therefore, from this e-mail you can see the output of the program you put. – user4124 Jan 29 '11 at 15:23DISPLAY=:0.0
to the crontab – Sep 03 '13 at 14:00