日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

设置linux的自动关机和windows的自动关机(篇幅一)

發布時間:2024/3/24 linux 44 豆豆
生活随笔 收集整理的這篇文章主要介紹了 设置linux的自动关机和windows的自动关机(篇幅一) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

一、在linux下設置自動關機:(服務器版CentOS-7.2系統,硬件:X86平臺)
1.1、關機配置腳本路徑:
[root@localhost home]# cat /etc/crontab
1.2、關機配置腳本內容:
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# For details see man 4 crontabs
# Example of job definition:
# .—————- minute (0 - 59)
# | .————- hour (0 - 23)
# | | .———- day of month (1 - 31)
# | | | .——- month (1 - 12) OR jan,feb,mar,apr …
# | | | | .—- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
1.3、關機配置通過man查詢命令細節如下:
[root@localhost home]# man 4 crontabs
CRONTABS(4) Crontabs users’ Manual CRONTABS(4)

NAME -- crontabs - configuration and scripts for running periodical jobsSYNOPSIS -- run-parts [--list|--test]<directory>DESCRIPTION -- Crontabs is a historical name for the run-parts script and the system crontab. The run-parts script runs all executables in the specified directory.Run-parts runs all by creating file jobs.allow or jobs.deny which worked similar as other allow/deny config files. The file must be created in the specified directory.--list print names of all files (not limited to executables), but don't run them. This option can't be used with test option.--test print names of files, which would be run.Randomization of jobs can be configured in the /etc/sysconfig/run-parts file. To enablerandomization of jobs, set the RANDOMIZE parameterto 1 and set the RANDOM parameter to an integer which determines a random seed. Additionally, you may configure the RANDOMTIME parameter(again, by specifying an integer) to provide an additional level of randomization. Jobs arenot randomized when the RANDOM and RANDOMTIMEparameters are set to 0. Values in these two parameters must be set to 1 or larger to provide agood enough randomization.Randomization of cron jobs can be useful for shared networks, where multiple cron jobs executed at once can cause spikes in traffic, especially during daily jobs. With randomized jobs, the orkload is evenly distributed throughout the day.EXAMPLE OF CONFIGURATION FILERANDOMIZE=1RANDOM=4RANDOMTIME=8Historically the crontab file contained configuration which called run-parts on files in cron.{daily,weekly,monthly} directories. These jobs arenow run indirectly through anacron to prevent conflicts between cron and anacron. That means the anacron package has to be installed if the jobsin these directories should be running. Refer to the anacron(8) how to limit the time of day of the jobexecution.EXAMPLE/etc/cron.daily/jobs.deny could contain for example 0logwatch which forbid execution of this script.SEE ALSOanacron(8), crontab(5)Marcela Ma?láňová 2012-08-29

1.4、實際操作結果
在命令窗口執行:crontab -e 進入編輯模式,
依照1.2的提示輸入要執行的命令。
CentOS下自帶命令如下:
1.4.1、使用方式:
crontab [options] file
crontab [options]
crontab -n [hostname]
1.4.2、操作選項(1.4.1中的 ‘options’):
-u define user 指定執行賬戶
-e edit user’s crontab 編輯執行命令
-l list user’s crontab 查看可執行用戶賬戶
-r delete user’s crontab 刪除某個賬戶的自啟命令
-i prompt before deleting 立即執行(不詢問)
-n set host in cluster to run users’ crontabs 設置集群情況下的核心機
-c get host in cluster to run users’ crontabs 集群情況下執行核心機的腳本
-s selinux context 安全模式執行
-x enable debugging 允許調試開機程序
1.4.3、測試效果:
Broadcast message from root@localhost
(unknown) at 17:29 …
The system is going down for halt NOW!
1.4.4、一些調試用到的東西:
a、crontab依賴linux的開機自啟服務:crond;
b、如果沒有該服務,只要可以執行crontab也可以說明已經安裝該服務,服務名可能被隱藏。
c、查看本機是否支持cronb服務:

篇幅限制,下接 “設置linux的自動關機和windows的自動關機(篇幅二)”

總結

以上是生活随笔為你收集整理的设置linux的自动关机和windows的自动关机(篇幅一)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: www亚洲| 久久久久久久久久久久久久久久久久久 | 亚洲少妇视频 | 2024国产精品| 草久久久久| 伊人免费视频二 | 国产小视频免费观看 | 国产嫩草影院久久久 | 国产精品精华液网站 | 国产在线高潮 | 97成人免费 | 成人精品一区二区三区中文字幕 | 蜜臀久久99精品久久久久久宅男 | 国产一区二区精品在线观看 | 一区二区欧美在线 | 中文字幕2区| 台湾无码一区二区 | 天天躁日日躁狠狠躁伊人 | 黄色一级片免费观看 | 日本免费在线观看视频 | 免费看av的网址 | 久久久久久国产精品 | 综合天天| 国产精品av在线播放 | 欧洲精品无码一区二区 | 亚洲欧洲免费 | 日韩精品一区二区三区网站 | 久久在线精品视频 | 日本欧美一区二区 | 日本护士取精xxxxxhd | 日韩乱码人妻无码系列中文字幕 | 香蕉茄子视频 | 国产精品亚洲一区二区 | 一级特黄aa大片 | 青娱乐国产 | 婷婷在线综合 | 中文在线字幕观看 | 欧美xxxxbbb | 娇小tube性极品娇小 | 好色综合 | 色爱av综合网 | 日韩精品极品 | 久久国产色av免费观看 | 成人福利视频网 | 高清一区在线观看 | 少妇被黑人到高潮喷出白浆 | 欧美成人吸奶水做爰 | 亚洲欧美日韩一区二区三区四区 | 欧美高跟鞋交xxxxxhd | 九九视频这里只有精品 | 久久精品h| 性欧美18| www在线视频| 中文字幕在线视频精品 | av色哟哟| 亚洲色图在线视频 | 日本男女网站 | 亚洲欧美日韩第一页 | 免费久草视频 | 夜夜爽天天操 | 日韩成人高清视频 | 在线电影一区二区三区 | 日韩经典午夜福利发布 | 久久成人人人人精品欧 | 成人羞羞国产免费动态 | 女同动漫免费观看高清完整版在线观看 | 超碰在线人人草 | 91chinese在线 | 尤物影院在线观看 | 国产a网站 | 亚洲大逼| 一本色道久久加勒比精品 | 亚洲第一网址 | av免费网站在线观看 | 天堂在线1 | 夜夜夜夜夜操 | 亚洲一区二区三区久久 | 欧美大尺度做爰啪啪床戏明星 | 天天色图片 | 在线看的网站 | 理论av| 中文天堂在线资源 | 五月婷婷激情四射 | 97午夜 | 亚洲午夜免费视频 | 麻豆网站在线免费观看 | 色妇av| 午夜精品久久久 | 91免费看国产| 国内精品福利视频 | 一二三四视频社区在线 | 亚洲中文字幕无码一区二区三区 | 欧美视频福利 | 国产精品成人免费一区二区视频 | 麻豆精品视频在线观看 | 爱爱动态图 | 国产欧美日韩精品一区二区三区 | 丝袜美腿亚洲综合 | 91日韩中文字幕 |