I created a java program that showed a message dialog. After pressing OK it is closed and the program execution ends.Then I created a shell script alarm.sh that executed the program. I tested it and it worked:$ alarm.sh -i It's time to ring up the revenue serviceHowever when I executed:$ echo alarm.sh \-i It's time to ring up the revenue service\ | at 15:00The message dialog didn't pop-up at 15:00 although the job was scheduled. Why? How does at execute shell scripts and what are its limitations?
Can at command execute any kind of shell script?
shell script;at
No, at can only run non interactive scripts.These scripts will be run without being attached to the terminal from where you launched the at command. If the program outputs something in its stdout and/or stderr flow, this output will be sent to you by mail.Some variables are not retained when the script is launched, especially DISPLAY, which is the reason why your attempt failed. You might have a look to your mail to see if the error is reported. If not, sendmail or similar is probably not installed/configured. If you want to use the current X11 display when the command will be run, you can set it that way:echo DISPLAY=$DISPLAY alarm.sh \-i It's time to ring up the revenue service\ | at 15:00