python - 树莓派中 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
解决方案
推荐阅读
- python - how to replace XML values with values from a list
- node.js - MongoError:拓扑被破坏,NODEJS
- python - 容器以非零退出代码 143 退出。被外部信号杀死
- python - 如何使用 Python 将一系列重复的数据行转换为多条记录的列?
- java - JMSCMQ0001:WebSphere MQ 调用失败,compcode '2' ('MQCC_FAILED') 原因 '2009' ('MQRC_CONNECTION_BROKEN')
- c++ - 代码使用向量成功运行,但使用数组显示错误
- c++ - 为什么我可以将变量存储在不是其最小对齐倍数的地址?
- python - 如何在 Jupyter Notebook 中运行 GitHub 代码?
- java - 如何在 jaxb XJC 生成期间重命名 xs:simpleType?
- javascript - 如何对空格分隔值进行是的电子邮件验证?