Wednesday, June 6, 2012

unable to add scheduled job in crontab at solarisis 9 server

i m finding problem in adding a job schedule in a crontab file on a 
solarisis 9 server 
pl advice 

Do not edit directly the cron file(s) , this is very bad practice. Use crontab -e to edit the cron 

What is the error you get, do you have this user in /etc/cron.d/cron.deny 
i m using crontab -e for editing ,ut the changes made r not getting saved
Enter the command crontab -l and redirect that output to new text file 

Then append your cron jobs in that file 

FInally enter crontab <filename> after that check ur previous process value 
equals to zero 
then remove that temporary file 

it (procedure) is not recognized by system... 

Can you run: head -5 /mta/imsysmon/ 
and paste output here? 
and what is the result of 
ls -l /mta/imsysmon/ 
do the user you create cron have right to read and execute the script?
pl advice 

i m adding the job schedule :0,15,30,45 * * * * 

Actually after editing the file i m getting a mail on the root user as 

Your "cron" job on server 

produced the following output: 

sh: /mta/imsysmon/ not found
  try to start script with user you try to add cron on this way: 
/usr/bin/bash -x /export/home0/imail/imsysmon/ 
and check if you see some errors, problems, etc. 

You might want to determine the shell being used by root and then export the editor. Something like this; 

export EDITOR=vi 
crontab -e  
  head -5 /export/home0/imail/imsysmon/ 

source /mta/imail/.profile 

umask 022 
  bash-2.05# ls -l /export/home0/imail/imsysmon/ 
-rwxrwxr-x 1 root root 405 Mar 18 17:36 
  It doesn't appear that you are not putting the correct path to the script in 
the cron schedule.... your schedule has. /mta/imsymon... and when you are 
giving us the head of the script it is /export/home... 

So either you are scheduling the wrong path or your links are wrong...  
  Does your script exist in that location? check for it 

ls -lrt /mta/imsysmon/  


Post a Comment

Design by BABU | Dedicated to grandfather | welcome to BABU-UNIX-FORUM