08-02-2011
Environment variables and cron
where do you set environment variables for cron jobs?
I have a feeling it would ignore ~/.bashrc ?
thanks.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am trying to run a series of perl scripts at different times using crontab under solaris. The scripts that i am using require some specific environment variables to be specified for database functionality, but i would also like it that i can specify a few global variables for output locations.
... (8 Replies)
Discussion started by: Smitty McSmith
8 Replies
2. Programming
hi,
I want to create a new EV(Environment Variable) through a c program and I done this thing through setenv() method. But the newly created EV is not permanent, i.e. when I exit from the program the EV also no longer lives. But I want to make it a permanent EV for the current user. Actually I... (6 Replies)
Discussion started by: sumsin
6 Replies
3. Solaris
Is it possible to use environment variables within cron jobs. I am using a cron job to run a c program at regular intervals. The C program uses a library and i have set the library path in the LD_LIBRARY_PATH environment variable. But when i ran the job i got the error library not found!! Any... (1 Reply)
Discussion started by: atheek
1 Replies
4. Shell Programming and Scripting
Hi,
If i have a variable set and exported in my pofile file will that variable be available in all shell scripts created.
Thanks,
Radhika. (3 Replies)
Discussion started by: radhika03
3 Replies
5. Shell Programming and Scripting
say i define an environment variable in a particular script (upgrade.sh).
my script is upgarde.sh and it calls another script try.sh. will this environment variable be accessible to try.sh also. if not how to I make environment variables global so that they can be used by any script. (2 Replies)
Discussion started by: lassimanji
2 Replies
6. UNIX for Dummies Questions & Answers
why are all environment variables represented in a fixed format regardless of the shell you use?
like $HOME $PATH etc (6 Replies)
Discussion started by: sravani
6 Replies
7. Shell Programming and Scripting
Hi,
In Cron file i'm using username and password hard-coded and now i wann to use environmental veraiables in cron file.
But Could you please guide me how to use these environmental variables in cron file ?
Thanks,
Shyamu.A (4 Replies)
Discussion started by: shyamu544
4 Replies
8. Shell Programming and Scripting
I have read tons of posts about how you can't set persisting environment variable in a child script of a shell and have it persist. The only way is to source a file as
% . <scriptname>
I am finding that true... but I know there is a way around it. I just don't know how. I worked for 6... (5 Replies)
Discussion started by: rwa25
5 Replies
9. Shell Programming and Scripting
Hi everyone,
I wrote a script that is supposed to be run by cron on a daily basis. It works just fine if I run it manually, but due to a lack of environment variables (which are available during my user session but not when cron runs the script) it keeps failing to run successfully.
Here's the... (2 Replies)
Discussion started by: gacanepa
2 Replies
10. HP-UX
Hi All,
I need to understand following three environment variables and their usages in HP Unix.
_M_ARENA_OPTS
_M_CACHE_OPTS
PTHREAD_SCOPE_SYSTEM
How does these environment variables influence multi threaded applciation and how do we decide the value of these variables? Is there... (0 Replies)
Discussion started by: angshuman
0 Replies
LEARN ABOUT HPUX
queuedefs
queuedefs(4) Kernel Interfaces Manual queuedefs(4)
NAME
queuedefs - queue description file for at, batch, and crontab
SYNOPSIS
DESCRIPTION
The file describes the characteristics of the queues managed by (see cron(1M)). Each non-comment line in this file describes one queue.
The format of the lines are as follows:
[njob[nice[nwait
The fields in this line are:
q The name of the queue, such that is the default queue for jobs started by (see at(1)), is the queue for jobs started by
(see at(1)), and is the queue for jobs run from a file (see crontab(1)). Queue names through designate user-defined
queues.
njob The maximum number of jobs that can be run simultaneously in that queue. Although any number can be specified here, (see
cron(1M)) by default limits the number of jobs that can be run on all the queues to 100. This limitation can be removed
by setting the variable to 1 in the file.
nice The value to give to all jobs in that queue that are not run with a user ID of super-user (see nice(1)). The default
value is 2.
nwait The number of seconds to wait before rescheduling a job that was deferred because more than njob jobs were running in that
job's queue, or because more than 100 jobs were running in all the queues (see njob above).
EXAMPLES
Consider the following file:
The file is interpreted as follows:
The queue, for jobs (see at(1)), can have up to 4 jobs running simultaneously, and those jobs will be run with a value of
1.
Since no nwait value is given, if a job cannot be run because too many other jobs are running, will wait 60 seconds
before trying again to run it (see cron(1M)).
The queue, for jobs (see at(1)), can have up to 2 jobs running simultaneously. Those jobs will be run with a value of 2.
If a job cannot be run because too many other jobs are running, will wait 90 seconds before trying again to run it.
All other queues can have up to 100 jobs running simultaneously. They will be run with a value of 2, and if a job cannot be run because
too many other jobs are running, will wait 60 seconds before trying again to run it.
SEE ALSO
at(1), nice(1), crontab(1), cron(1M), proto(4).
STANDARDS CONFORMANCE
queuedefs(4)