Find the answer to your Linux question:
Results 1 to 2 of 2
hi all i have a problem we have a large no of users in our file server and have alloted quota as 30 mb for each unfortunately we had to ...
  1. #1
    Just Joined!
    Join Date
    Mar 2007
    Posts
    1

    running script - scheduling in crontab -(script not working more than 5mins)

    hi all

    i have a problem

    we have a large no of users in our file server and have alloted quota as 30 mb for each

    unfortunately we had to create some usernames starting with 0 (eg: 0233na0044) and we created it and are able to use it

    how ever it worked but we were not able to set quota for the id's starting with 0(numbers)

    so we decided to go for scripts.

    check every user home directory size and lock it if it exceeds 30mb.

    its's working fine when run manualy as root(it runs for nearly 20 mins in our machine)

    but in when running through crontab(cron) it runs partially and exits.
    (there is an another process scheduled to run every 5 mins)

    can anyone help me in finding a solution.

    sree

  2. #2
    Just Joined! fatalexception's Avatar
    Join Date
    Feb 2007
    Posts
    34
    Instead of running it in a crontab you can create a wrapper around the script which calls it in a loop. This would eliminate multiple instances of the script overlapping. Could be as simple as:
    Code:
    while : ; do nameofscript.sh; done
    I've also seen plenty of scripts meant to be run as cron jobs that actually check for instances of themselves that are running, and quitting if they exist.

    Wish I understood your problem better. Sounds interesting.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...