Sponsored Content
Operating Systems Solaris Environment variables and cron Post 302543796 by ygemici on Tuesday 2nd of August 2011 05:26:24 AM
Old 08-02-2011
what is your os and bash version? do you have a .bashrc file?
if you want to set enviroments globaly,you can edit /etc/default/cron.
or you can add bash startup scripts to your cron scripts.
Code:
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
if [ -f ~/.bash ]; then
. ~.bash_profile
fi

regardss
ygemici
This User Gave Thanks to ygemici For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Cron Environment

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

environment variables

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

Setting environment variables within cron jobs!!

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

environment variables

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

using environment variables

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

Environment variables

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

Setting environment variables in Cron file

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

Environment variables

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

Run script through cron with user environment variables

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

Environment Variables

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
atq(1)								   User Commands							    atq(1)

NAME
atq - display the jobs queued to run at specified times SYNOPSIS
atq [-c] [-n] [username]... DESCRIPTION
The atq utility displays the at jobs queued up for the current user. at(1) is a utility that allows users to execute commands at a later date. If invoked by a user with the solaris.jobs.admin authorization, atq will display all jobs in the queue. If no options are given, the jobs are displayed in chronological order of execution. When an authorized user invokes atq without specifying username, the entire queue is displayed; when a username is specified, only those jobs belonging to the named user are displayed. OPTIONS
The following options are supported: -c Displays the queued jobs in the order they were created (that is, the time that the at command was given). -n Displays only the total number of jobs currently in the queue. FILES
/var/spool/cron/atjobs spool area for at jobs. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
at(1), atrm(1), auths(1), cron(1M), auth_attr(4), attributes(5) SunOS 5.11 13 Aug 1999 atq(1)
All times are GMT -4. The time now is 08:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy