@reboot cronjob not executing

后端 未结 4 1119
说谎
说谎 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:42

    I've had a similar problem with a @reboot cron job not running; in case it helps anyone else:

    The problem for me is that my home directory is encrypted with eCryptfs (which is what you get if you choose to encrypt your home directory when installing Ubuntu) - broadly speaking this means that the contents of your home directory aren't available until you log in, but cron runs @reboot jobs on reboot, not when you log in.

提交回复
热议问题