Linux: Run cron job in foreground

前端 未结 4 571
眼角桃花
眼角桃花 2020-12-30 09:59

In Linux, is there a way to run a cron job in the foreground (or interactive mode)? (I have a program that runs periodically to accept user input and do some processing. So

4条回答
  •  清歌不尽
    2020-12-30 10:38

    For GUI scripts in cron, try the following line in a shell:

    crontab -e
    

    Then in crontab :

    0 7 * * * DISPLAY=:0 /PATH/TO/SCRIPT
    

提交回复
热议问题