Discussion Locked

Crontab

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Crontab is not reading user defined crons at system reboot. I need to have root su into the user's account and insert a comment in the user's cron file and save it in order for the cron file to become active. How can I write a script to automatically insert a comment in the user's cron. I cannot get crontab to execute any commands once I execute a crontab -e from my script.

6 replies

by d-ced

Check that the users names don't appear in the /etc/cron.d/cron.deny file. This file contains the list of users that will NOT be allowed to use CRONTAB...
Moreso, ensure that their name is in /etc/cron.d/cron.allow

Also, ensure that write permissions are set correctly for the directory that contains the crontab files.

by jodi.langdon

The issue still exists. After a reboot, the AIX will not read the users cron unless they make a change to their cron and save it.

by d-ced

You should ensure that users are editing their cron files by using the command "crontab -e" and not simply editing the cron file. The changes are only registered with CRON if they are made through "crontab -e"

by jodi.langdon

Users are using crontab -e for editing their crontab file. This is only happening on AIX servers running 4.3.3 OS.

by debian

Can you check the permissions of that user.Give him full permissions to him and run your script check the error messages in /var/cron/log file for futer messages

by ghislain.levesque

Verify which shell you are using within these crontab jobs. Root is probably a ksh and the job might be running in a born shell from crontab. In your script, put at the first line #!/bin/ksh
to force the script to run in a ksh environment. Verify the path also.

This discussion is closed to new replies.