There is bash in cron script with wine executing. In cronjob log I see:
wine: Unhandled exception 0x0eedfade in thread 9 at address 0xce99ebf0:0x7b83e6ce (thread 0009), starting debugger...
err:winediag:nulldrv_CreateWindow Application tried to create a window, but no driver could be loaded.
err:winediag:nulldrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
err:seh:setup_exception_record stack overflow 928 bytes in thread 0009 eip 7bc843a0 esp 00230f90 stack 0x230000-0x231000-0x330000
I tryed two approaches to avoid this problem, but no one worked.
1) In bash script:
DISPLAY= wine my_program.exe
2) In crontab
52 15 * * * export DISPLAY= && bash myscript.sh >> /var/log/mylog.log 2>&1
How to fix this error?
The binary
wine
is meant for graphical programs, it needs an X server to run. If your program doesn't have a graphical interface, usewineconsole
instead.