Wednesday, June 6, 2012

unable to add scheduled job in crontab at solarisis 9 server

hi, 
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 
  Hi, 

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

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

i m adding the job schedule :0,15,30,45 * * * * 
/mta/imsysmon/startimsysmon.sh 

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

Your "cron" job on server 
/mta/imsysmon/startimsysmon.sh 

produced the following output: 

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

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

>bash 
export EDITOR=vi 
crontab -e  
  head -5 /export/home0/imail/imsysmon/startimsysmon.sh 
#!/usr/bin/bash 

source /mta/imail/.profile 

umask 022 
  bash-2.05# ls -l /export/home0/imail/imsysmon/startimsysmon.sh 
-rwxrwxr-x 1 root root 405 Mar 18 17:36 
/export/home0/imail/imsysmon/startimsysmon.sh 
  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/startimsysmon.sh  

0 comments:

Post a Comment

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