@reboot cronjob not executing

后端 未结 4 1105
说谎
说谎 2021-01-15 12:30

I have a Python script which simply writes some text and saves it to a file

#! /usr/bin/python3
def main():
     filename = \'/home/user/testHello.txt\'
             


        
4条回答
  •  無奈伤痛
    2021-01-15 12:44

    Mark Roberts pointed out a few things I'd done wrong.

    Namely, the spaces here

    MAIL = root
    HOME = /
    

    Get rid of those spaces..

    Next, having Cron configuration fixed to email every minute.. instead of what I had :

    */1 * * * * /home/user/tester.py
    

    Seems to me Lubuntu doesn't support the @Reboot Cron syntax.

提交回复
热议问题