Crontab entry issue

Hi, I added below entry in crontab. Cron is triggering the script but actual script is not running.

Cron entry:

45 * * * * /data/crons/Purge/TransferLogMaint.sh 3 20000 300 > /dev/null 2>&1

Cron log entry:

Apr 17 12:45:01 <servername> crond[12058]: (root) CMD (/data/crons/Purge/TransferLogMaint.sh 3 20000 300 > /dev/null 2>&1)

Can anyone help with this please....

thanks

instead of directing output and error to /dev/null , write it in a temp file and check what the error is. That info would be helpful in further troubleshooting

Hi shailesh, thanks for the reply. I did wirte to temp file but nothing written to log file because the script did not run.
If we are passing parameters to a script in cron do we need to use any extra conditions?

Hi,

have the file the right (execution) permission?

chmod 750 TransferLogMaint.sh

No extra condition required for parameters from cron.
Can you post you script here ?

Please post what Operating System and version you have and what Shell you use.

Please look in the unix mail file for the owner of the crontab. If there is anything fundamentally wrong (like execute permissions on the script) it will be in there.

Ps. Quite clearly the cron did fire because it appears in the cron log.
Each cron run has a fairly unique identity/pid (in your case 12058). Use grep to find any more lines for that cron (from the inception to the end/failure) and pay particular attention to lines containing response codes rc= .

bad post

As other posters suggest, can you post the contents of:

/data/crons/Purge/TransferLogMaint.sh

And mention what evidence there is that the script did not run?