CronTab

Hello experts,

I've got a question on cron command.
The scenery is this:

  • I need to make the backups on the system where i work
  • I can do it myself at late hours, or I can let the Operative System do it for me.

What is my problem? My problem is that the CronTab, aparently didn't worked for two times now. Here is what i've done:

1) I created one file named cron_bck.txt in my desktop and putted in this:
30 03 * * 1-5 /home/jorge/JJ/bck_medidata.txt

2) Then i send it through ftp to my UNIX Server and did
crontab cron_bck.txt

That was it
What have i done wrong?

This is supposed to execute the command in /home/jorge/JJ/bck_medidata.txt at 03:30 hours everyday from monday to friday right?

Can someone help?

Jorge Ferreira

The crontab looks ok to me.

Are you sure your script (bck_medidata.txt) is installed at the referenced location (/home/jorge/JJ/) and has execute permissions?

(If you ftp'd bck_medidata.txt as well you would have 'lost' the execute attributes in the transfer).

Oh yes. And ... are you sure the script isn't running, but failing silently. There should be a log file listing what actions cron performs. On HP-UX it will be /var/adm/cron/log.

Read the man page for cron and the standard location for the log should be documented for your system.

Ok guys,

I've got the problem solved. It was not with the crontab but with the script.

Thank you for your help

post how you fixed the initial problem so if someone else is haveing the same issue they dont have to ask the same questions.

As i said, the problem was with the script and not with the CronTab.

This script was suposed to backup a few files and send information to a script when it started and finished so i knew if it made the backup or not and when. The problem was that it wasn't writing in the right file so i didn't saw it. And as i didn't saw it, i thought that the script wasn't running, when all that was happenning was that the file was being created somewhere else.

Sorry for the inconvenience,