Crontab Not working appropriate?
I created two scripts. One for opening an image with kuickshow, the other for powering off computer.
my_picture script contains: Code:
#!/bin/bash Code:
#!/bin/bash Crontab -e Code:
53 22 * * * '/home/bdd86/Documents/my_picture' When I run ./my_picture in konsole it opens fine. but Crontab just doesnt seem to run it at all? How can I get crontab to open a picture in kuickshow? THank you! |
permission??
|
No I ran chmod 755 my_script and when i do ./my_script it works perfect... Crontab just wont run it???????
|
kuickshow is an X application which crontab cannot handle.
KC |
Ok, how can I make a script Open up a Konsole, with pre-written text in it, saying You have 30 Minutes until computer power off?
|
try adding DISPLAY=:0 to the begining of your crontab file...
KC |
No this didn't work, heres my crontab file
Code:
# DO NOT EDIT THIS FILE - edit the master and reinstall. |
Try adding the line directly to crontab using "crontab -e". A script is not required in most cases.
DISPLAY=:0 00 21 * * Mon-Fri kuickshow /home/bdd86/Documents/goodnight.gif This works fine for me... Test it and see... KC |
Have you considered the shutdown command? It can be scheduled and gives a warning to logged in users one minute in advance.
Needs to be run by the root user... For example: Code:
sudo shutdown 00:35 |
Kencaz, for some reason, that worked PErfectly that time. I think i was using "'"s in the wrong place. THanks alot, My Notice system for my g/f's sister to get off my computer Is Working, and poweroff works perfectly 1 minutes later. Thanks dude :)!!!!!!!!!
|
All times are GMT -5. The time now is 09:52 AM. |