cron ジョブを使用して Wine exe をスケジュールすると、エラーが発生します。

cron ジョブを使用して Wine exe をスケジュールすると、エラーが発生します。

私は基本的なPythonスクリプトを実行するためにexeファイルを準備しようとしてきました。

wine sample.exeDebian Linux() で手動で実行すると期待どおりに実行されますが、次のようにcron実行すると

[45] Failed to start embedded python interpreter!
Fatal Python error: init_sys_streams: can't initialize sys standard streams
Python runtime state: core initialized
OSError: [WinError 6] Invalid handle

Current thread 0x0000002e (most recent call first):
<no Python frame>
  • クローンタブドア:
    35 12 * * 1 /home/user/sample/run_sample.sh > /home/user/sample/last_run.log 2>&1
    
  • run_sample.shコンテンツ:
    wine /home/user/sample/sample.exe
    

sample.exeWindowsシステムでPyInstallerを使用して準備されたexeファイル。手動で実行するとうまく動作しますが、唯一の問題はcronを使用して実行することです。

ベストアンサー1

おすすめ記事