如何让电脑在特定时间自动关机

下载PDF文件下载PDF文件

你是否经常忘记在睡觉前关闭电脑?是否经常因为工作繁忙而忽略时间?这篇文章将教你如何让电脑在特定时间自动关机。

方法 1
方法 1 的 2:

使用任务计划程序

下载PDF文件
  1. How.com.vn 中文: Step 1 打开任务计划程序。
    你可以在Windows 7和Windows 8系统中使用任务计划程序。在Windows 7系统中,点击 “开始”菜单 → “控制面板” → 系统和安全 → 管理工具→ 任务计划程序。在Windows 8系统中,按下Win 键,输入“计划任务”,从搜索结果中选择“任务计划”程序。
  2. How.com.vn 中文: Step 2 点击“创建基本任务...”。
    这个选项位于窗口的右侧、操作菜单中。你需要输入任务的名字和描述。尽量用简单的名字来命名任务,如“定时关机”。点击下一步>
  3. How.com.vn 中文: Step 3 选择任务频率。
    在“任务触发器”页面中,选择“每天”选项,然后点击下一步>。接着选择具体的关机时间,选择每晚什么时间让电脑自动关机。让“每隔:X 天发生一次”设置为“1”。点击下一步>
  4. How.com.vn 中文: Step 4 选择“启动程序”。
    这个选项位于“操作”界面,应该是电脑自动选择的默认选项。点击下一步> 按钮。
  5. How.com.vn 中文: Step 5 输入关机程序的路径。
    当Windows系统关机时,它实际上是运行了一个关机程序。在“程序或脚本”中,输入C:\Windows\System32\shutdown.exe
    • 在“添加参数”一栏,输入/s。点击下一步 >
  6. How.com.vn 中文: Step 6 浏览你的设置。
    在概要界面,浏览你的设置,确认你已选择正确的时间。点击完成按钮,保存任务。此时,你的电脑会在每天特定的时间自动关机。[1]
    广告
方法 2
方法 2 的 2:

创建一个BAT 文件

下载PDF文件
  1. How.com.vn 中文: Step 1 打开记事本。
    具体操作是,前往 “开始”菜单> 所有程序> 附件> 记事本。或者,在“开始”菜单中,直接输入“记事本”(不要输入引号),按下回车键。
  2. How.com.vn 中文: Step 2 复制以下代码:
    • @echo off
    • :W
    • if %time%==00:00:00.00 goto :X
    • goto :W
    • :X
    • shutdown.exe /s /f /t 60 /c "去睡觉!!!!!!"
      • 这个命令会不断地查看时间,看是否到了午夜。如果到了午夜,它会给你发送一条“去睡觉!!!”的消息,然后自动关闭电脑。
  3. How.com.vn 中文: Step 3 将“if %time%==”部分的时间更改为你选定的时间。
    你输入的时间必须是这种格式:HH:MM:SS.MS,而且必须是24小时制,否则无法正常工作。
  4. How.com.vn 中文: Step 4 前往 文件> 另存为。
    • 将“保存类型”更改为“所有文件”。
    • 在文件名一栏输入“timer(定时器).bat”,然后点击“保存”。
  5. How.com.vn 中文: Step 5 双击文件。
    屏幕上应该会出现一个空白的命令提示符界面。
  6. How.com.vn 中文: Step 6 当你在工作的时候,不要关闭这个窗口。
  7. How.com.vn 中文: Step 7 当到达你在步骤3中设定的时间时,你的电脑应该会显示一条消息,然后在一分钟后关闭电脑。
  8. How.com.vn 中文: Step 8 如果你想要终止关机,请按下Windows键(就是有微软商标的按键)+ R键。
  9. How.com.vn 中文: Step 9 在出现的窗口中输入“shutdown -a”(不要带引号),按下回车键。
    应该会出现命令提示符窗口,接着就会消失。然后会出现一个跟它类似的气球状窗口。
    广告

警告

  • 这些步骤仅适用于 Windows 7系统的用户。对于其它操作系统来说,这个程序可能并不可用。
  • 记住,不要关闭命令提示符窗口。如果你愿意的话,可以最小化窗口。
广告

关于本How.com.vn

How.com.vn是一个“多人协作写作系统”,因此我们的很多文章都是由多位作者共同创作的。 为了创作这篇文章,志愿作者多次对文章进行了编辑和改进。 这篇文章已经被读过6,745次。
分类: 电脑
本页面已经被访问过6,745次。

这篇文章对你有帮助吗?

⚠️ Disclaimer:

Content from Wiki How 中文 language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

Notices:
  • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
  • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
  • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
  • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

广告