Cron Jobs Not Executing

Hi Guys,

Good day! I don't know what's the problem with this, I have two (2) entries in Crontab, these 2 entries are scripts which I've created. I need these 2 for automatic backup and maintaining only 3 files under a given directory. Here are my entries below, and they are NOT executing:

00 16 * * * /usr/bin/expect /home/rymnd/emong/autobackup
10 16 * * * /usr/bin/sh /home/rymnd/emong/backup_remover

Any advise please. Btw my Cron is Version V5.0

Thanks in advance!

BR,
rymnd12345

---------- Post updated at 09:26 AM ---------- Previous update was at 09:22 AM ----------

To add-up to, I've tried entering this below in Cron and YES it worked, but not for my 2 scripts. All permissions were already set to 777 even the sub-directory itself.

0 15 * * * cp /home/rymnd/scripts/file.sh /home/rymnd/emong/

Thanks!

BR,
rymnd12345

what your cron log says ?

check /var/log/cron

Hi itkamaraj,

I can't seem to find /var/log/cron.

Thanks!

You said which version of "cron" you were using. More useful would be which OS (+version) you are using.

Hi Scott,

It's SUSE� Linux Enterprise Server (SLES)

Boo. I was hoping you'd pick one I know something about :slight_smile:

"According" to Google, cron logs basic stuff in /var/log/messages on SuSE.

Look in unix mail for the owner of the cron. Any errors from the cron job should be there.

Btw. Permissions 777 is a security nightmare.

Just in case you didn't realise, the three crons posted will fire in the afternoon at 16:00 16:10 and 15:00 .

Firstly, I think that you need a "-f" between the expect string and the command string.

Secondly, most errors like this with expect under cron are caused by terminal or environment variable issues. A cron job knows nothing about TERM variable so if the job requires input, then it doesn't know where to go to get it. It also doesn't know where to send any output since it has no TERM. Send output to /dev/null if you can. Repeat, check terminal and environment variables needed by cron.