General discussion

Locked

Crontab

By jodi.langdon ·
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.

This conversation is currently closed to new comments.

6 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Crontab

by D-CEd In reply to Crontab

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.

Collapse -

Crontab

by jodi.langdon In reply to Crontab

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.

Collapse -

Crontab

by D-CEd In reply to Crontab

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"

Collapse -

Crontab

by jodi.langdon In reply to Crontab

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

Collapse -

by debian In reply to Crontab

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

Collapse -

by ghislain.levesque In reply to Crontab

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.

Back to Linux Forum
6 total posts (Page 1 of 1)  

Related Discussions

Related Forums