首页 > 编程语言 >crontab on raspberry pi, full path, not relative path, is needed.

crontab on raspberry pi, full path, not relative path, is needed.

时间:2024-09-09 18:02:20浏览次数:7  
标签:10 reboot crontab https put path raspberry

Sources: https://forums.raspberrypi.com/viewtopic.php?t=296993   thanks thagrol, thanks RaTTuS,
you are right.
I get wrong. 10 * * * * reboot -> is not reboot in 10 min. It is next hour at minute 10 reboot

*/10 * * * * reboot -> it is rebbot in 10 min

But instruction reboot it is NOT understand by crontab. Yo have to put:
*/10 * * * * /sbin/reboot

And very important you have to do it in the root crontab as pointed by DougieLawson
sudo crontab -e
and inside crontab:
*/10 * * * * /sbin/reboot

Why? I don't know but it is how it works. In the prompt line, you can write reboot and works but not in crontab

I hope this helps many others       since reboot command must be effectively executed by root account, you have to put this cron job in 'sudo crontab -e'   However, if you just execute a regular command, for example, `wget -cq https://www.economist.com/*.zip`;  just put it in 'crontab -e'   https://crontab.guru/  

标签:10,reboot,crontab,https,put,path,raspberry
From: https://www.cnblogs.com/profesor/p/18405034

相关文章

  • AtCoder Beginner Contest 318 G - Typical Path Problem 题解
    G-TypicalPathProblem题目大意给定一张\(N\)个点、\(M\)条边的简单无向图\(G\)和三个整数\(A,B,C\)。是否存在一条从顶点\(A\)到\(C\),且经过\(B\)的简单路径?数据范围:\(3\leN\le2\times10^5\)\(N-1\leM\le\min(\frac{N(N-1)}2,2\times10^5)\)\(1\leA......
  • Python和MATLAB(Java)及Arduino和Raspberry Pi(树莓派)点扩展函数导图
    ......
  • 微信小程序报错:Component is not found in path "components/comp/comp.js"
    完整错误jsEnginScriptError:Componentisnotfoundinpath"components/comp/comp.js"(usingbypages/index/index);onAppRouteError:Componentisnotfoundinpath"components/comp/comp.js"(usingbypages/index/index) ine(...) ...错误......
  • 微信小程序报错:Component is not found in path "components/comp/comp.js"
    完整错误jsEnginScriptError:Componentisnotfoundinpath"components/comp/comp.js"(usingbypages/index/index);onAppRouteError:Componentisnotfoundinpath"components/comp/comp.js"(usingbypages/index/index) ine(...) ...错误......
  • The Staff Engineer’s Path
    本文档是一本关于软件工程师职业发展的指南,特别关注于如何成为技术领导者和团队中的关键人物。作者通过自己的经验和对行业的研究,提供了一系列实用的建议和策略,帮助读者在职业生涯中取得成功。软件工程师的职业路径:技术领导者的角色:讨论了技术领导者在组织中的重要性,强......
  • [ABC293Ex] Optimal Path Decomposition 题解
    [ABC293Ex]OptimalPathDecomposition题解是一道难得一遇的好题。对于题目中的两个限制,同时满足是困难的,于是考虑常见的套路:先固定其中一个,再计算另一个。对于本题,显然\(k\)是有单调性的,于是考虑二分这个\(k\),将最优性问题转化为可行性问题,dp路径的最小长度。那么考虑d......
  • Adding /usr/local/lib to the dynamic (shared) link library path list on a Debian
    Toaddthepath/usr/local/libtothedynamic(shared)linklibrarypathlistonaDebian12x64system,youcandoiteithertemporarilyforthecurrentsessionorpermanentlyforallsessions.Herearethestepsforbothmethods:TemporaryMethod(forth......
  • 【Python xpath爬虫实战】抓取下厨房的菜谱信息,并存储到MySQL数据库
    获取全部的本周最受欢迎菜谱信息本周最受欢迎菜谱_下厨房获取标题,详情页链接,原材料列表,七天内做过人数,作者字段数据需要存入mysqlimportrequestsfromlxmlimportetreeimportpymysqldb_config={'host':'127.0.0.1',#数据库地址'user':'root',#......
  • 【Python xpath爬虫实战】抓取纵横小说图书信息,并存储到MySQL数据库
    写在前面本篇博客只是为练习xpath的用法,其中的实践案例用其他的更简单方法也可以实现。想着实战演练一遍(主要是里面的案例无法使用,哭唧唧),找了一下经常爬取的网站,例如淘宝,知网什么的,但是这些网站都需要登录,难度偏大一点,就给否决掉了,最后选到了纵横小说排行榜这个网站,因为这个......
  • cron 表达式与crontab表达式详解
    转:https://zhuanlan.zhihu.com/p/614584979引言CRON表达式详解(阿里巴巴)我们在定时任务中经常能接触到cron表达式,但是在写cron表达式的时候我们会遇到各种各样版本的cron表达式,比如我遇到过5位、6位甚至7位的cron表达式,导致我一度搞混这些表达式。更严重的是,当我们没有准确写出......