To Williamen
"that is not work,
errpt is command,"
Those statements right there are not correct, it works I tried it, what you are doing is appending the errpt o/p to that file everyday at 2:45 PM.
On your script (myfile), have you check the permissions and ownership? change the file permission to 744 (read, write &execute for the owner)
I have tried the below and its working for me
ls -l /tmp/myfile
-rwxr--r-- 1 root system 22 Sep 16 10:17 /tmp/myfile
# cat /tmp/myfile
errpt >> /tmp/err1
I have tried using '-a' flag for errpt as well, and in both cases its appending.
18 10 * * * /tmp/myfile 2>&1
-rw-r--r-- 1 root system 82952 Sep 16 10:18 /tmp/err1
, look at the time stamp on file
cat /tmp/err1
BFE4C025 0901075913 P H sysplanar0 UNDETERMINED ERROR
BFE4C025 0901075813 P H sysplanar0 UNDETERMINED ERROR
BFE4C025 0901075813 P H sysplanar0 UNDETERMINED ERROR
BFE4C025 0901075713 P H sysplanar0 UNDETERMINED ERROR
BFE4C025 0901075713 P H sysplanar0 UNDETERMINED ERROR
BFE4C025 0901075613 P H sysplanar0 UNDETERMINED ERROR
BFE4C025 0901075513 P H sysplanar0 UNDETERMINED ERROR
A6DF45AA 0901074413 I O RMCdaemon The daemon is started.
BFE4C025 0901074113 P H sysplanar0 UNDETERMINED ERROR
BFE4C025 0901074113 P H sysplanar0 UNDETERMINED ERROR
BFE4C025 0901074113 P H sysplanar0 UNDETERMINED ERROR
You did not followed what I mentioned, you added your own flavor and complaining its messed up, wait a minute, roll back, take a deep breath and look at it again.
I bet, you din't read my post thoroughly.
In the file 'myfile', where are you pointing the logerSBX log file? you are not directing it under /amin, but instead to user's home directory, and you are looking under '/amin' directory, how can you find it?
Secondly, try to go easy, 1st use a specific time for crontab to run the job.
Say you are working on it at 9am, use 9 10 (10 minutes after 9 am) as crontab entry for the job.
Check to see if '/amin' directory exist? if it does exist make sure you have it at right place (say you want to create '/amin', make sure its under '/' and not under any other sub directory). Also make sure you are point the output to correct location.
Lastly, check the ownership of the directory and its files? If it doesn't belong to you change the ownership.