Results 1 to 3 of 3
Hi everybody. I've done a script to download the news from the website of the national italian channel. Because I am living abroad and do not have the satellite, with ...
- 10-17-2007 #1Just Joined!
- Join Date
- Oct 2007
- Posts
- 5
How to cron a script?
Hi everybody. I've done a script to download the news from the website of the national italian channel. Because I am living abroad and do not have the satellite, with this script I obtain the link of the latest news (that changes everyday, that's why the script is handy) on the website, and with a great program mimms save the video on the filesystem. I have installed two jobs in crontab, one that runs at 10 p.m. that saves the file, the other one that wakes my up at 8 a.m. playing it. But that's the problem, if I type on the command line:
[diego @d-lap:~]$ gmplayer /home/diego/dowload/mimms.wmv
everything is fine, but if I put the same instruction in cron I can hear, but I cannot see the movie. Why? I am not running any screensaver if this can help. My crontab looks like this (crontab -e):
# m h dom mon dow command
00 08 * * * /usr/bin/gmplayer /home/diego/download/mimms.wmv
Thank you everybody that can give me useful information.
- 10-17-2007 #2Linux User
- Join Date
- Jun 2007
- Posts
- 318
This is only a guess. When something is run in cron most people don't realize that their environment isn't set up like it is when they log in. In this case I suspect that environment variable DISPLAY isn't defined. I'd say write a script to define it and then run the video and see if that helps.
DISPLAY=":0.0"
export DISPLAY
/usr/bin/gmplayer /home/diego/download/mimms.wmv
Also, you may not have a screen saver but do you have it to lock screen?
Vic
- 10-18-2007 #3Just Joined!
- Join Date
- Oct 2007
- Posts
- 5
thank you so much
now it works just fine!!
thank you vsemaska!!


Reply With Quote