Operating System - Linux
1829148 Members
2619 Online
109986 Solutions
New Discussion

crond is running jobs error out.

 
SOLVED
Go to solution
rmueller58
Valued Contributor

crond is running jobs error out.

All,

I have a backup job of one of my file systems that is supposed to be running at 2:30AM

I have a script and an entry in the Crontab
CRONTAB ENTRY:
30 02 * * * * /usr/local/bin/classback.sh

SCRIPT:
/bin/tar -cvf /backup/`date +m%d%Y`class.tar /class 2>&1 > /dev/null
/bin/gzip /backup/class*tar 2>&1 > /dev/null

permissions are 775

However as soon as the Cron daemon runs the schedule, within 30 seconds an email comes in and says:

/bin/sh: line 1: command not found

I've checked pathing and such of the tar and gzip executables, everything looks ok.
I am baffled.. Any insights from the group would be greatly appreciated.

Rex M
Systems and Engineering
Educational Services #3, LaVista
2 REPLIES 2
John Poff
Honored Contributor
Solution

Re: crond is running jobs error out.

Hi,

It looks like you have one extra asterisk '*' in your time specification in your crontab definition, which means that crond thinks your command line is '*' instead of your script.

JP
rmueller58
Valued Contributor

Re: crond is running jobs error out.

Jeezzz,

Somedays is just doesn't pay to get out of bed.. Thanks John.. That did it.