首页 > 解决方案 > 树莓派中 crontab 的 @reboot 函数

问题描述

.py在 Raspberry Pi 中运行我的脚本时出现此错误。
而且,谁能告诉我如何.py在启动时每分钟自动运行脚本?

/bin/sh: 1: rfkill: not found
Traceback (most recent call last):
  File "/home/pi/ble.py", line 179, in <module>
    bl = Bluetoothctl()    
  File "/home/pi/ble.py", line 20, in __init__
    out = subprocess.check_output("rfkill unblock bluetooth", shell = True)
  File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command 'rfkill unblock bluetooth' returned non-zero exit status 127

标签: pythoncronraspberry-pi3

解决方案


推荐阅读