に実行可能スクリプトを配置しました/etc/cron.hourlyが、そのスクリプトは1時間ごとに実行されるわけではなく、実際にはまったく実行されません。
ここに私が作成したスクリプト(時の音)があります:
#!/ bin / bash mplayer〜/ Music / sfx_msg-highlight.wv&> / dev / null& spd-say -r -50 -p 50 -t male3「今は$(date + "%l%p")です」 notify-send "それは:" "$(date +"%l%p ")now。" -i〜/ Pictures / "first tee.png" -t 5000
私のcrontabは:
DISPLAY=":0.0"
XAUTHORITY="/home/naruto/.Xauthority"
XDG_RUNTIME_DIR="/run/user/1000"
0 * * * * /home/naruto/Hour-sound.sh
一方でmplayerとspd-sayコマンドが正しく実行されている、notify-sendではありません。また、エラーをファイルにリダイレクトしようとしました:
0 * * * * /home/naruto/Hour-sound.sh 2>/tmp/error
しかし、それは出力を示しませんでした。私は何を間違えていますか?
/etc/crontabファイルには、ラインを持っていますか17 * * * * root cd / && run-parts --report /etc/cron.hourly?
/etc/crontabのrun-parts行はありcronますか?