我想自动化我的python文件,但我做不到。在我的crontab中:
31 01 * * * /usr/bin/python3 /home/attyan22/python_lesson/crontest_2.py
错误:
Return-Path: <[email protected]>
X-Original-To: attyan22
Delivered-To: [email protected]
Received: by mx.LAPTOP-SGBTV53C.com (Postfix, from userid 1000)
id 5867B240000000612A3; Sat, 27 Apr 2019 01:31:02 +0900 (DST)
From: [email protected] (Cron Daemon)
To: [email protected]
Subject: Cron <attyan22@LAPTOP-SGBTV53C> /usr/bin/python3 /home/attyan22/python_lesson/crontest_2.py
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/attyan22>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=attyan22>
Message-Id: <[email protected]>
Date: Sat, 27 Apr 2019 01:31:02 +0900 (DST)
/usr/bin/python3: can't open file '/home/attyan22/python_lesson/crontest_2.py': [Errno 13] Permission denied
和权利是:
attyan22@LAPTOP-SGBTV53C:~$ sudo ls -l /home/attyan22/python_lesson/crontest_2.py
[sudo] password for attyan22:
-rwx--x--x 1 attyan22 attyan22 0 Apr 26 20:24 /home/attyan22/python_lesson/crontest_2.py
attyan22@LAPTOP-SGBTV53C:~$ sudo ls -l /home/attyan22/python_lesson/crontest_2.py
-rwx--x--x 1 attyan22 attyan22 0 Apr 26 20:24 /home/attyan22/python_lesson/crontest_2.py
attyan22@LAPTOP-SGBTV53C:~$ sudo ls -l /usr/bin/python3
lrwxrwxrwx 1 attyan22 attyan22 9 Oct 25 2018 /usr/bin/python3 -> python3.6
attyan22@LAPTOP-SGBTV53C:~$ sudo ls -l /usr/bin/python3.6
-rwxr-xr-x 2 root root 4522328 Oct 22 2018 /usr/bin/python3.6
我想使用 cron 自动执行我的 python 程序。如何删除它?
操作系统 WSL UBUNTU。