Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

user cron problems

Status
Not open for further replies.

jonjo

MIS
Nov 6, 2002
3
0
0
US
We have numerous AIX boxes (7043-140, 7043-150, and 7044-170). We have recently downloaded a modified user application to these systems, and as a result needed to put a new root cron into place with minor changes. Each system, in addition to running a root cron, also runs 2 user crons. Each of these systems reboots overnight, and when the new root cron is moved into place (prior to system reboot) the root cron and the 2 user crons run. After the system reboots only the root cron runs; the user crons do not kick-off. If we put the original root cron back in place (the modified application remains), the user crons begin working again.

The change made to the root cron involves su'ing to a user to execute a script. In the original root cron we su'ed to a user by name ( su - name) because each system had the same user. Now we su to a user variable (su - $variable) because this user is unique on each system.

Any ideas as to what may be causing the user crons to stop?
 
That sounds strangely complex, having crontabs being changed frequently, not knowing anything about your environment I would suggest looking deeper into cron for scheduling details to make it unnecessary to change out crontabs.

That being said, the only other thing I can think of is to stub off the user crons and see if the $variable is being set properly at execution time.
 
I had met a similar problem,althought use a su - username operation,but the cron script can't get the user variable,and you need to change the variable prior.
 
My feeling is that with this new user usage in cron you have a problem with the environment the user cron runs.
Try adding loading the specific user environment within the cron line for this user.

"Long live king Moshiach !"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top