4 Replies Latest reply: May 26, 2011 6:28 AM by abrante RSS

    Cron jobs failing

    850824
      Hi,

      I have sceduled a cron script to autologout the users if they are idle for more than 1 hour. I have added that to the cronjobs and scheduled it to run every 30 minutes.

      But i got the below mail,
      --------------------------------------------------------------
      Your "cron" job
      /timeout

      produced the following output:

      kill: 5310: permission denied
      kill: 14614: permission denied
      ----------------------------------------------------------------
      I m running the cronjobs as a informix user....i have set the permission of script as 777.
      eventhough i m getting the same error.
      Can anybody please help me out to run this script in cron job?

      Thanks
        • 1. Re: Cron jobs failing
          abrante
          It sounds like your cronjob, which is running as the 'informix' user, is trying to kill processes belonging to other users. This will not work. To kill processes owned by other users you would have to run it as 'root'.

          As an alternative you may modify your script so it only tries to kill processes owned by 'informix'..

          .7/M.
          • 2. Re: Cron jobs failing
            850824
            Hi Abrante,

            I tried to run the cron job as a root. But it neither killed the idle sessions nor through any error message to /usr/mail/root.
            It didnt do anything to kill the idle users. Do i need to do any changes in any of the files or any changes to permissions to make it to run?
            Please help me out to solve this problem.

            Thanks
            • 3. Re: Cron jobs failing
              bobthesungeek76036
              Stupid question: Is the password for 'root' expired? Cron jobs will not run for users with expired or locked passwords...
              • 4. Re: Cron jobs failing
                abrante
                If you are to kill any user, not just the user as which you are running the cronjob you will have to run the cronjob as root. If it doesn't give the expected behaviour you should start debugging it from there..

                .7/M.