树梅派定时关机

利用crontab实现树梅派的定时关机 crontab(cron table 命令用于编辑执行中的定期任务列表,并且操作是基于每个用户的,每一个用户(

利用crontab实现树梅派的定时关机

crontab(cron table 命令用于编辑执行中的定期任务列表,并且操作是基于每个用户的,每一个用户(包括 root 用户)都拥有自己的 crontab 。

命令:sudo nano /etc/crontab
编辑crontab在最后添加定时关机命令
编辑之后如下:
实现每天早上7:45关机

# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user  command
17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --repo$
47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --repo$
52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --repo$
45 7    * * *   root    /sbin/shutdown -h now
#

发布者:admin,转转请注明出处:http://www.yc00.com/web/1738080337a4022242.html

相关推荐

  • windows10定时关机如何设置

    win10系统自带有很多的功能,比如说定时关机等。有小伙伴想要给自己的电脑设置定时关机,但是对win10系统不了解,不知道如何设置win10定时关机。下面小编就教下大家win

    3月前
    70
  • Windows10系统设置定时关机

    1.输入 cmd 运行 命令提示符 2.直接输入  shutdown –s –t 3600,不需要调整目录     [注:3600为倒计时的秒数,此语句为系统在一小时后关机]

    1月前
    00
  • 树梅派定时关机

    利用crontab实现树梅派的定时关机 crontab(cron table 命令用于编辑执行中的定期任务列表,并且操作是基于每个用户的,每一个用户(

    1月前
    10
  • 如何xp计算机每天定时关机,xp定时关机,教您xp系统怎么设置定时关机

    现在差不多家家户户已经有了电脑,而用户在使用的过程中,难免会因为有时候有急事,正好赶上电脑正在运行某个软件,不能关机,然而&

    1月前
    20
  • 实现 Windows 系统定时关机或重启

    需求 1. 下载大量内容需要挂机?想要下载完成后自动关机? 2. 想要电脑长期运行后自动重启? 3. 亦或是有其他原因需要让你的 Windows 电脑定时关机或重启&

    1月前
    30
  • Win7下设置“定时关机”的方法

    【Win7下设置定时关机的方法】 ●【所有程序】→【附件】→【系统工具】→【任务计划程序】 ●  右键单击,选择【创建基本任务】,然后在【任务名称】中填自定义名称,如“定时关

    9小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信