Sponsored Content
Full Discussion: Cron job
Top Forums Shell Programming and Scripting Cron job Post 302080647 by grial on Thursday 20th of July 2006 04:16:41 AM
Old 07-20-2006
You can do what you want. Let's say one of those scripts you have is "myscript.sh" and, as you said, your env is in "setEnv.sh".
Then, add to "myscript.sh" a line like this:
Code:
. /path/to/setEnv.sh

You only have to do the same in every script you need to.

Remember that you have to export the variables in "setEnv.sh" just for this to work.

Regards.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cron job

Hi All I am trying to run a .sh file from cron but its not performing its intended purpose, though the same sh file works fine when triggered manually.Following mail I recieve when it tries to run the script. ********************************************************* To: wlsdev05 Subject:... (16 Replies)
Discussion started by: pankajkrmishra
16 Replies

2. UNIX for Dummies Questions & Answers

Cron job

Regarding Cron job, i want to execute a scriptevery 4 days once irrespective of a week or a month. Is it possible?Any help (2 Replies)
Discussion started by: santho
2 Replies

3. UNIX for Dummies Questions & Answers

CRON usage for CRON job

can anybody explain the usage of CRON for adding a cron job. please provide an example also for better understanding !!! Thanks (1 Reply)
Discussion started by: skyineyes
1 Replies

4. UNIX for Dummies Questions & Answers

cron job

I created a php script i want to run as a cronjob. Where or how can I locate the cronjob file to add my script ? (3 Replies)
Discussion started by: dannyd
3 Replies

5. Solaris

cron job starts new cron proccess

I run cron in solaris 10 zone. One cron job which syncing files to nfs mounted on container, creates after finishing another cron proccess(/usr/sbin/cron), and after 100 existing cron proccesses next cron job will not start. It's too weird for me, I'm not able to solve this problem. Theoretically... (3 Replies)
Discussion started by: ron76
3 Replies

6. UNIX for Advanced & Expert Users

cron job

Hello, Can anyone help me how to set any script as cron job. I have gone through all threads but not able to get the details. Appreciate your help. I need to set test.pl to run on every Tuesday by 6am in the morning. I do not the cron file which is defined. Please help me out. ... (3 Replies)
Discussion started by: jam_prasanna
3 Replies

7. Solaris

Cron job running even after cron is removed

Hi , I have removed a cron for particular user , but cron job seems to be running even after the cron entry is removed. The purpose of the cron was to sendmail to user ( it uses mailx utility ) I have restarted cron and sendmail service still user is getting mail alerts from the cron job. And... (4 Replies)
Discussion started by: chidori
4 Replies

8. Shell Programming and Scripting

Commented cron job -- cron monitoring

Hi I have a requirement to write a shell script,that will check the all commented job in cron job.Please help !! (2 Replies)
Discussion started by: netdbaind
2 Replies

9. UNIX for Dummies Questions & Answers

Cron Job

How to schedule a cron job to run every other Monday. Thanks in advance. (2 Replies)
Discussion started by: ITDev01
2 Replies

10. Shell Programming and Scripting

Cron job - Need to run Cron every quarter at particular time

Hi, 1) If some job supposed to run on 1st of every month at 7 AM In cron job when we have a blackout on the 1st ( i.e when 1st falls on a sunday ) how can we make the job run the next business day? 2) How can we run a job on 25th of every quarter 7 AM(jan,apr,jul,oct) And if 25th... (5 Replies)
Discussion started by: System Admin 77
5 Replies
java_home(1)						      General Commands Manual						      java_home(1)

NAME
java_home - return a value for $JAVA_HOME SYNOPSIS
/usr/libexec/java_home [options] DESCRIPTION
The java_home command returns a path suitable for setting the JAVA_HOME environment variable. It determines this path from the user's enabled and preferred JVMs in the Java Preferences application. Additional constraints may be provided to filter the list of JVMs avail- able. By default, if no constraints match the available list of JVMs, the default order is used. The path is printed to standard output. OPTIONS
-v or --version version Filters the returned JVMs by the major platform version in "JVMVersion" form. Example versions: "1.5+", or "1.6*". -a or --arch architecture Filters the returned JVMs by the architecture they support. Example architectures: "i386", "x86_64", or "ppc". -d or --datamodel datamodel Filters the returned JVMs capable of running in 32 or 64-bit mode. Supported datamodels: "-d32" and "-d64". Specifying a datamodel is synonymous with specifying a particular architecture. -t or --task task Selects from the list of JVMs which can run a specific task. The order of each of these lists is set by the Java Preferences appli- cation. Supported tasks: "Applets", "WebStart", "BundledApp", "JNI" and "CommandLine". The default task is "CommandLine". -F or --failfast Immediately fails when filters return no JVMs; does not print out the path to the default $JAVA_HOME. --exec command ... Executes the command at $JAVA_HOME/bin/<command> and passes the remaining arguments. Any arguments to select which $JAVA_HOME to use must precede the --exec option. -X or --xml Prints the list of selected JVMs and associated properties as an XML plist to stdout. -V or --verbose Prints the matching list of JVMs and architectures to stderr. -h or --help Brief usage information. USAGE
/usr/libexec/java_home helps users set a $JAVA_HOME in their login rc files, or provides a way for command-line Java tools to use the most appropriate JVM which can satisfy a minimum version or architecture requirement. The --exec argument can invoke tools in the selected $JAVA_HOME/bin directory, which is useful for starting Java command-line tools from launchd plists without hardcoding the full path to the Java command-line tool. Usage for bash-style shells: $ export JAVA_HOME=`/usr/libexec/java_home` Usage for csh-style shells: % setenv JAVA_HOME `/usr/libexec/java_home` 04 August 2010 java_home(1)
All times are GMT -4. The time now is 09:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy