LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-15-2012, 10:31 PM   #1
david_ng
LQ Newbie
 
Registered: Aug 2012
Posts: 5

Rep: Reputation: Disabled
Anacron not performed successful


Hi All,
I have trying to using anacron to do cronjob.
But i received the error, that cannot running successful on startup, any idea for this error?
/var/syslog:
Aug 16 08:26:36 raspberrypi anacron[2098]: Anacron 2.3 started on 2012-08-16
Aug 16 08:26:36 raspberrypi anacron[2098]: Will run job `cron.daily' in 5 min.
Aug 16 08:26:36 raspberrypi anacron[2098]: Will run job `backup' in 5 min.
Aug 16 08:26:36 raspberrypi anacron[2098]: Will run job `backupMRB' in 5 min.
Aug 16 08:26:36 raspberrypi anacron[2098]: Will run job `upgrade' in 5 min.
Aug 16 08:26:36 raspberrypi anacron[2098]: Will run job `update' in 5 min.
Aug 16 08:26:36 raspberrypi anacron[2098]: Jobs will be executed sequentially
Aug 16 08:28:34 raspberrypi kernel: [ 166.235103] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
Aug 16 08:28:34 raspberrypi kernel: [ 166.594526] ip_tables: (C) 2000-2006 Netfilter Core Team
Aug 16 08:28:34 raspberrypi kernel: [ 166.700266] nf_conntrack version 0.5.0 (3446 buckets, 13784 max)
Aug 16 08:30:01 raspberrypi /USR/SBIN/CRON[2212]: (david) CMD (/usr/bin/python3 /home/david/scripts/autoRun/ddns/UpdateIP.py)
Aug 16 08:31:36 raspberrypi anacron[2098]: Job `cron.daily' started
Aug 16 08:31:36 raspberrypi anacron[2218]: Updated timestamp for job `cron.daily' to 2012-08-16
Aug 16 08:31:44 raspberrypi anacron[2098]: Job `cron.daily' terminated
Aug 16 08:31:44 raspberrypi anacron[2098]: Job `backup' started
Aug 16 08:31:44 raspberrypi anacron[2098]: Job `backup' terminated (exit status: 1) (mailing output)
Aug 16 08:31:44 raspberrypi anacron[2098]: Can't find sendmail at /usr/sbin/sendmail, not mailing output
Aug 16 08:31:44 raspberrypi anacron[2098]: Job `backupMRB' started
Aug 16 08:31:44 raspberrypi anacron[2098]: Job `backupMRB' terminated (exit status: 1) (mailing output)
Aug 16 08:31:44 raspberrypi anacron[2098]: Can't find sendmail at /usr/sbin/sendmail, not mailing output
Aug 16 08:31:44 raspberrypi anacron[2098]: Job `upgrade' started
Aug 16 08:31:44 raspberrypi anacron[2098]: Job `upgrade' terminated (exit status: 1) (mailing output)
Aug 16 08:31:44 raspberrypi anacron[2098]: Can't find sendmail at /usr/sbin/sendmail, not mailing output
Aug 16 08:31:44 raspberrypi anacron[2098]: Job `update' started
Aug 16 08:31:44 raspberrypi anacron[2098]: Job `update' terminated (exit status: 1) (mailing output)
Aug 16 08:31:44 raspberrypi anacron[2098]: Can't find sendmail at /usr/sbin/sendmail, not mailing output
Aug 16 08:31:44 raspberrypi anacron[2098]: Normal exit (5 jobs run)


Following is my /etc/anacrontab:
david@raspberrypi ~ $ cat /etc/anacrontab
# /etc/anacrontab: configuration file for anacron

# See anacron(8) and anacrontab(5) for details.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
HOME=/root
LOGNAME=root

# These replace cron's entries
1 5 cron.daily run-parts --report /etc/cron.daily
7 10 cron.weekly run-parts --report /etc/cron.weekly
1 5 backup run-parts bash /home/david/scripts/autoRun/backup/backup.sh
1 5 backupMRB run-parts bash /home/david/scripts/autoRun/backup/backupMBR.sh
1 5 upgrade run-parts sudo apt-get updrade
1 5 update run-parts sudo apt-get -y update
@monthly 15 cron.monthly run-parts --report /etc/cron.monthly


It is anacrontab setting wrong?
 
Old 08-15-2012, 10:47 PM   #2
david_ng
LQ Newbie
 
Registered: Aug 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Ok, i have check the document of the crontab
so , the run-parts is mean run the dir contained file , but i provided file path
may be /etc/anacrontab should changed to following.
# /etc/anacrontab: configuration file for anacron

# See anacron(8) and anacrontab(5) for details.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
HOME=/root
LOGNAME=root

# These replace cron's entries
1 5 cron.daily run-parts --report /etc/cron.daily
7 10 cron.weekly run-parts --report /etc/cron.weekly
1 5 backup /bin/bash /home/david/scripts/autoRun/backup/backup.sh
1 5 backupMBR /bin/bash /home/david/scripts/autoRun/backup/backupMBR.sh
1 5 upgrade sudo apt-get updrade
1 5 update sudo apt-get -y update
@monthly 15 cron.monthly run-parts --report /etc/cron.monthly
 
Old 08-16-2012, 07:00 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,364

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I think you need to fix this error at least
Code:
... Can't find sendmail at /usr/sbin/sendmail, not mailing output
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Truncation operation not performed Abishek Programming 3 08-04-2012 02:23 AM
how to get the name of the user who performed a task in Linux? venkat_k Programming 9 10-15-2008 07:17 PM
user nobody performed su? twlilinux Linux - Security 7 07-09-2008 12:23 PM
Windows performed better - what am I doing wrong?! endif Linux - Newbie 12 06-25-2008 12:05 PM
Performed mkswap on / partition! phaeton Linux - General 3 03-15-2006 09:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration