0

I have created my first CRON job. It appears to be working as the entry in syslogs. It looks like, to me that the routine takes about a minute to complete. This is in keeping with when I run the command manually and works great creates a file no problem.

The CRON job however fails to create the file and I can't see any clues in the log file. I running Ubuntu version 12, here is a section of the log. Where should I look next??

thanks

Sep 12 09:45:01 jasperSrv CRON[2523]: (root) CMD (/home/jason/jasperreports-server-cp-4.1.0/buildomatic/js-export.sh --everything --output-zip jas.zip)
Sep 12 09:46:05 jasperSrv postfix/pickup[1146]: 7734D200189: uid=0 from=<root>
Sep 12 09:46:05 jasperSrv postfix/cleanup[2559]: 7734D200189: message-id=<20130912084605.7734D200189@jasperSrv>
Sep 12 09:46:05 jasperSrv postfix/qmgr[1147]: 7734D200189: from=<root@jasperSrv>, size=75610, nrcpt=1 (queue active)
Sep 12 09:46:05 jasperSrv postfix/local[2563]: 7734D200189: to=<root@jasperSrv>, orig_to=<root>, relay=local, delay=0.58, delays=0.35/0.1/0/0.12, dsn=2.0.0, status=sent (delivered to mailbox)
Sep 12 09:46:05 jasperSrv postfix/qmgr[1147]: 7734D200189: removed
Sep 12 09:48:38 jasperSrv crontab[2582]: (root) BEGIN EDIT (root)
Sep 12 09:49:14 jasperSrv crontab[2582]: (root) REPLACE (root)
Sep 12 09:49:14 jasperSrv crontab[2582]: (root) END EDIT (root)
Sep 12 09:50:01 jasperSrv cron[844]: (root) RELOAD (crontabs/root)
Sep 12 09:50:01 jasperSrv CRON[2600]: (root) CMD 
4

1 回答 1

2

从日志看来,Cron 向 root 发送了一封带有输出的邮件。检查那个。

 sudo su
 mail

也尝试crontab作为普通用户使用。这避免了使用 root 权限。

于 2013-09-12T12:12:17.413 回答