![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems . |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| cronjob inside the script | namishtiwari | Shell Programming and Scripting | 3 | 02-04-2008 05:35 AM |
| HOw do i give a user cronjob edit/settings permission? | debu | UNIX for Advanced & Expert Users | 2 | 01-24-2008 02:44 AM |
| help help cronjob problem with script | bucci | Shell Programming and Scripting | 4 | 02-10-2007 01:38 AM |
| cronjob dies when user password expires | sparcguy | SUN Solaris | 4 | 02-05-2007 12:04 AM |
| switch user inside a script | nimo | Shell Programming and Scripting | 2 | 11-04-2005 04:51 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#8
|
|||
|
|||
|
Hi Thanks.
Will running the script under root resolve the problem? Regards, csg_user. |
| Forum Sponsor | ||
|
|
|
#9
|
|||
|
|||
|
I would try and avoid stuff as root.
Can you describe step by step what your script does? |
|
#10
|
|||
|
|||
|
The script(script1) will recycle our application services. This script could only be executed as the application user . So, We run this script manually by sudo su - appl_user , then password , then run the script . $myscript name. Now , iam trying to automate it . So, iam calling in a cronjob .But, that is not working .
Actually, based on this result, i need to create another script(script2) which will call the script1 only if some application conditions are satisfied. That is where the sudo/password for the appl_user is creating problems. Please help .Many thanks in advance. |
|
#11
|
|||
|
|||
|
Confirm that script works from home directory of user you want it to run as when run from a terminal/ssh/telnet login.
That will prove if the user has all the rights etc. Then do a "set" to print all the environment variables that are present before the script was run. Look through them and identify ones your script will need. When the cron task runs assume none of those variables will be set (except a few, eg HOME). As I said, 99% of cron problems are environment based. |
|
#12
|
|||
|
|||
|
This is the sort of thing that can be run rom root's cron:
Code:
0,15,30,45 * * * * su - myuser -c /opt/myfolder/myscriptname |
|||
| Google The UNIX and Linux Forums |