How to test a cron job?

后端 未结 2 718
故里飘歌
故里飘歌 2021-01-14 01:50

I\'m using Ubuntu Linux 10.0.4. I want to run a script every 6 hours, every day. When I issue sudo crontab -e, I see:

# m h  dom mon dow   co         


        
2条回答
  •  鱼传尺愫
    2021-01-14 02:32

    Cron should mail it results so it looks like you have a problem. Here, it seems you are missing a user to run the script as :

    00,06,12,18 * * * user_name /opt/scripts/selenium/run_nis_inf_tests.sh
    

    replace user_name by the name of the user the script needs to be run by, verify permissions of "run_nis_inf_tests.sh" and you should be ok.

提交回复
热议问题