亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 2070 | 回復: 4
打印 上一主題 下一主題

[系統(tǒng)管理] linux crontab腳本執(zhí)行的輸出問題 [復制鏈接]

論壇徽章:
5
金牛座
日期:2015-07-03 13:32:00卯兔
日期:2015-07-03 13:32:17程序設(shè)計版塊每日發(fā)帖之星
日期:2015-11-29 06:20:0015-16賽季CBA聯(lián)賽之同曦
日期:2015-12-15 09:36:06CU十四周年紀念徽章
日期:2016-07-06 17:18:48
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2015-12-02 11:05 |只看該作者 |倒序瀏覽
  1. test.sh:
  2. #!/bin/bash

  3. echo "test std print!"
復制代碼
設(shè)置crontab執(zhí)行
* * * * * sh test.sh

并沒有指定輸出重定向,那么"test std print"會輸出到哪里?

論壇徽章:
0
2 [報告]
發(fā)表于 2015-12-02 20:23 |只看該作者
如果你能執(zhí)行?

論壇徽章:
84
每日論壇發(fā)貼之星
日期:2015-12-29 06:20:00每日論壇發(fā)貼之星
日期:2016-01-16 06:20:00每周論壇發(fā)貼之星
日期:2016-01-17 22:22:00程序設(shè)計版塊每日發(fā)帖之星
日期:2016-01-20 06:20:00每日論壇發(fā)貼之星
日期:2016-01-20 06:20:00程序設(shè)計版塊每日發(fā)帖之星
日期:2016-01-21 06:20:00每日論壇發(fā)貼之星
日期:2016-01-21 06:20:00程序設(shè)計版塊每日發(fā)帖之星
日期:2016-01-23 06:20:00程序設(shè)計版塊每日發(fā)帖之星
日期:2016-01-31 06:20:00數(shù)據(jù)庫技術(shù)版塊每日發(fā)帖之星
日期:2016-01-16 06:20:00程序設(shè)計版塊每日發(fā)帖之星
日期:2016-01-16 06:20:00程序設(shè)計版塊每日發(fā)帖之星
日期:2016-01-14 06:20:00
3 [報告]
發(fā)表于 2015-12-03 10:32 |只看該作者
/dev/null

論壇徽章:
5
金牛座
日期:2015-07-03 13:32:00卯兔
日期:2015-07-03 13:32:17程序設(shè)計版塊每日發(fā)帖之星
日期:2015-11-29 06:20:0015-16賽季CBA聯(lián)賽之同曦
日期:2015-12-15 09:36:06CU十四周年紀念徽章
日期:2016-07-06 17:18:48
4 [報告]
發(fā)表于 2015-12-03 11:22 |只看該作者
回復 3# yjh777

有相關(guān)資料嗎?我從測試情況看是這樣的。

可以確定的是,如果配置了MAILTO=root,錯誤輸出是會mail給root的

   

論壇徽章:
84
每日論壇發(fā)貼之星
日期:2015-12-29 06:20:00每日論壇發(fā)貼之星
日期:2016-01-16 06:20:00每周論壇發(fā)貼之星
日期:2016-01-17 22:22:00程序設(shè)計版塊每日發(fā)帖之星
日期:2016-01-20 06:20:00每日論壇發(fā)貼之星
日期:2016-01-20 06:20:00程序設(shè)計版塊每日發(fā)帖之星
日期:2016-01-21 06:20:00每日論壇發(fā)貼之星
日期:2016-01-21 06:20:00程序設(shè)計版塊每日發(fā)帖之星
日期:2016-01-23 06:20:00程序設(shè)計版塊每日發(fā)帖之星
日期:2016-01-31 06:20:00數(shù)據(jù)庫技術(shù)版塊每日發(fā)帖之星
日期:2016-01-16 06:20:00程序設(shè)計版塊每日發(fā)帖之星
日期:2016-01-16 06:20:00程序設(shè)計版塊每日發(fā)帖之星
日期:2016-01-14 06:20:00
5 [報告]
發(fā)表于 2015-12-03 17:10 |只看該作者
是的默認發(fā)郵件的,-s 發(fā)送到系統(tǒng)日志:

CRON(                                                        System Administration                                                        CRON(

NAME
       crond - daemon to execute scheduled commands

SYNOPSIS
       crond [-c | -h | -i | -n | -p | -P | -s | -m<mailcommand>]
       crond -x [ext,sch,proc,pars,load,misc,test,bit]

DESCRIPTION
       Cron is started from /etc/rc.d/init.d or /etc/init.d when classical sysvinit scripts are used. In case systemd is enabled, then unit file is
       installed into /lib/systemd/system/crond.service and daemon is started by systemctl start crond.service  command.  It  returns  immediately,
       thus, there is no need to need to start it with the '&' parameter.

       Cron  searches  /var/spool/cron for crontab files which are named after accounts in /etc/passwd; The found crontabs are loaded into the mem‐
       ory.  Cron also searches for /etc/anacrontab and any files in the /etc/cron.d directory, which have a  different  format  (see  crontab(5)).
       Cron examines all stored crontabs and checks each job to see if it needs to be run in the current minute.  When executing commands, any out‐
       put is mailed to the owner of the crontab (or to the user specified in the MAILTO environment variable in the crontab, if such exists).  Any
       job output can also be sent to syslog by using the -s option.
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP