Hi,
I have to edit 2 crontabs on an AIX box. The 1st is that of root, the other is of the user foo. I have a script that cleans off old entries I inserted before and appends new cron entries to the end off the crontabs. This works fine, but the problem is, that the cron-Daemon doesn't recoginze that there has been any changing to the crontabs and will run with the old crontab information, even an crontab -l will show the new appended instructions. If you do a crontab -e on the altered crontab and you save the file, a signal will be sent to the cron-Daemon to make it recognizing the new instructions and read the crontab.
All this updating of the crontabs occurs at night via shell scripts so there is no crontab -e possible. I read, that you can do crontab <filename> and it will overwrite the original crontab under /var/spool/cron/crontabs. The problem is, that this only works for root, as doing it with su - foo -c "crontab /var/spool/cron/crontabs/foo" will complain about the permissions on the file, which are root:cron. I don't want to change the permissions at all but I would like to have my altered crontab of the non-root user to be recognized.
I also tried a -SIGHUP ie. kill -1 on the cron-Daemon, no chance. I searched SMITTY if I could do a refresh -s on cron but that is not available in the list.
Help is very appreciated, thanks in forward.
On Linux it works with just overwriting or appending to the crontab of non-root users :-/
But Linux is no option at the moment.
laters
zaxxon
I have to edit 2 crontabs on an AIX box. The 1st is that of root, the other is of the user foo. I have a script that cleans off old entries I inserted before and appends new cron entries to the end off the crontabs. This works fine, but the problem is, that the cron-Daemon doesn't recoginze that there has been any changing to the crontabs and will run with the old crontab information, even an crontab -l will show the new appended instructions. If you do a crontab -e on the altered crontab and you save the file, a signal will be sent to the cron-Daemon to make it recognizing the new instructions and read the crontab.
All this updating of the crontabs occurs at night via shell scripts so there is no crontab -e possible. I read, that you can do crontab <filename> and it will overwrite the original crontab under /var/spool/cron/crontabs. The problem is, that this only works for root, as doing it with su - foo -c "crontab /var/spool/cron/crontabs/foo" will complain about the permissions on the file, which are root:cron. I don't want to change the permissions at all but I would like to have my altered crontab of the non-root user to be recognized.
I also tried a -SIGHUP ie. kill -1 on the cron-Daemon, no chance. I searched SMITTY if I could do a refresh -s on cron but that is not available in the list.
Help is very appreciated, thanks in forward.
On Linux it works with just overwriting or appending to the crontab of non-root users :-/
But Linux is no option at the moment.
laters
zaxxon