I have machine with SunOS APP5a 5.9 Generic_122300-19 sun4u sparc SUNW,Sun-Fire
With crontab like this :
59 23 * * * /home/lng/script/move_and_compress_logs_update.sh
But that crontab cannot running at that time. I run my script by manually, the result is fine.
What must I check at crontab problem? services..? or anything else..?
I'm just assuming here but are you doing some sort of archiving of logs and moving them to a folder named according to the date on which the script runs? If so, and you are using the `date` command in your script, then there might be an issue with running the script at 23:59. Remember, the date changes at 00:00.
If your job executes itself correctly on command line (interactive shell) but not using cron (batch), it is very often due to environment error: Have you loaded in your script all the ENV variables it needs for execution? One way to see if env is the problem is to execute your .profile in the beginning of your script:
. $HOME/.profile
But dont forget even HOME isn't set for cron... you will have to give full path...