Posted: 6/20/2015 10:46:03 PM EDT
| I'm using Mint 17.1 on one computer and need to run a program, "wine "/home/david/.wine/drive_c/Program Files (x86)/Binreader/Binreader.exe"" automatically from 12:10am to 5:00am each day with it being killed at 5:00am. Google has not been my friend and Gnome Scheduler doesn't work with it. I have satellite internet and from 12:am to 5:00am is the free time. This is so simple in Windows Scheduler but so far doing this in Linus has beat me. |
|
http://www.unixgeeks.org/security/newbie/unix/cron-1.html
Setup two cron jobs. One to start it and one to kill it, |
|
Quoted:
http://www.unixgeeks.org/security/newbie/unix/cron-1.html Setup two cron jobs. One to start it and one to kill it, I've been trying this all day and it does nothing. I found something somewhere that said cron won't work with a GUI on recurring tasks. |
|
This might help: http://ubuntuforums.org/showthread.php?t=185993
It sounds like you need to export the DISPLAY variable along with the command. Try adding these to crontab: 10 0 * * * export DISPLAY=:0 && wine "/home/david/.wine/drive_c/Program Files (x86)/Binreader/Binreader.exe" 0 5 * * * killall wine |
|
Quoted:
This might help: http://ubuntuforums.org/showthread.php?t=185993 It sounds like you need to export the DISPLAY variable along with the command. Try adding these to crontab: 10 0 * * * export DISPLAY=:0 && wine "/home/david/.wine/drive_c/Program Files (x86)/Binreader/Binreader.exe" 0 5 * * * killall wine Quoted:
This might help: http://ubuntuforums.org/showthread.php?t=185993 It sounds like you need to export the DISPLAY variable along with the command. Try adding these to crontab: 10 0 * * * export DISPLAY=:0 && wine "/home/david/.wine/drive_c/Program Files (x86)/Binreader/Binreader.exe" 0 5 * * * killall wine Doesn't work. I've been using Gnome Schedule, but I checked in crontab to make sure the above was put in it by Gnome Schedule (well the above with the time changed to one minute from when I wanted to see if it worked). I found this in the Gnome Schedule docs - Gnome Schedule does not support yet setting environment variables for recurrent tasks, but it will do soon. In the meantime, you can manually create a script that first defines DISPLAY variable and then calls the graphical application. Finally, you can create a recurrent task to launch the script.
I have no idea how to write a script to do this. |
|
Quoted:
From a terminal type crontab -e, add the lines I posted and save the file They were already there fron where I was using Gnome Schedule. I just change the time one minute up from the current time a couple times in crontab to see if it would work. It didn't. |
|
Quoted:
What I had already looks like the full path?? Quoted:
Quoted:
Maybe try adding the full path of the wine command What I had already looks like the full path?? The full path to the wine command, type 'which wine' and then replace that where you just have "wine" |
|
GOT IT!!!!
After a 100 Google pages today I finally found it. It needs an export in front of DISPLAY. export DISPLAY=:0 && wine "/home/david/.wine/drive_c/Program Files (x86)/Binreader/Binreader.exe" Thanks, you got me to the DISPLAY, and I found it from there. Somehow, even though I thought I just copied and pasted your line, I missed the export. |