Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Cron giving odd errors
num
post Jan 16 2008, 03:42 PM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 3
Joined: 16-January 08
Member No.: 13,261



I run cron to logout users at a certain time and then run my system backup for the database and then a complete back up

Someone changed the email address and ever since them it's been sending me the email of status with errors the following are the emails with subject in "( )"


/bin/bash: line 1: root: command not found (root run-parts /etc/cron.daily)

/bin/bash: line 1: root: command not found (root /root/backup/daily.backup)

/bin/bash: /root/backup/daily.backup: /bin/bash: bad interpreter: No such file or directory (/root/backup/backup.daily)

/bin/bash: line 1: root: command not found (root /root/logout/logout_everyone_latest)


And here is Cron
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=belmonti@mail.csi.cuny.edu
HOME=/
# run-parts
#01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
#Daily backup. Tuesday through Saturday 1:00 AM.
0 1 * * 2-6 root /root/backup/daily.backup
#Weekly backup. Runs on Sunday 1:00 AM.
0 1 * * 7 root /root/backup/weekly.backup
#Logout Students every weeknight and Saturday at 9:30 PM.
30 21 * * 1-6 root /root/logout/logout_everyone_latest
#Weekly backup. Runs on Sunday 1:00 AM.
0 1 * * 7 root /root/backup/placement.report
#Synchronize system time with time server. Runs on Monday at 1:00 AM.
0 1 * * 1 root rdate -s -u time.nist.gov



anyone with more knowledge than me on this topic would be doing me a great service by helping out with a suggestion.
oh i checked and yes all files backup.daily and so on are in their proper directory

Thanks again
-J
Go to the top of the page
 
+Quote Post
num
post Jan 17 2008, 12:50 AM
Post #2


Whats this Lie-nix Thing?
*

Group: Members
Posts: 3
Joined: 16-January 08
Member No.: 13,261



*** Chop - DS2K3 ***


Bump
Go to the top of the page
 
+Quote Post
DS2K3
post Jan 17 2008, 07:57 AM
Post #3


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,284
Joined: 14-November 04
From: Southampton, Hampshire
Member No.: 4,165



Generally, you don't need to bump things a day after you post - We (sadly) don't have the volume of traffic to push your post off of the front page in that time scale - Maybe bump after a week. Regardless of when, you don't need to re-quote whole original post :-)

Anyway, in answer to your question:

I think you need to remove the "root" portion of each line - The user which a command runs under is determined by whose "crontab" (type "man 5 crontab" for more info) the command is listed in. In this case, the "root" is being interpreted as part of the command that you want to execute (obviously it isn't actually a command, hence the error) rather than information about who to do it as.

D


--------------------
Fixed your problem? Let us know!
richard@linuxhelp.net

www.Gathr.co.uk Online Event Management
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th October 2017 - 12:08 PM