Operating System - HP-UX
1822004 Members
3904 Online
109639 Solutions
New Discussion юеВ

Re: declare multiple date in jil autosys

 
autosys unix
New Member

declare multiple date in jil autosys

how can declare month end dates in jil autosys
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: declare multiple date in jil autosys

Shalom,

You question lacks enough detail for anyone to answer. It actually lacks a question.

I have consulted the force (A. Clay), a crystal (Beer mug, Pete Randall), and the tea leaves tell me you may be trying to to date calculations.

http://www.hpux.ws/caljd.sh

http://www.hpux.ws/caljd.pl

Thats as good as I can do based on the information given.

Sadly the force can't be used by me, a mere non-Jedi to lift a beer glass. That I'm doing right now as I click the mouse.

Apologies if my joke offends. Zero point me. I got enough.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
autosys unix
New Member

Re: declare multiple date in jil autosys

sorry,
you mistake me ,i need a jil script for this job like i want to run one job in every month end how i can write a jil script in autosys .
thanks.
Steven E. Protter
Exalted Contributor

Re: declare multiple date in jil autosys

Actually the scripts I posted do that. You have to take a little time to read the help file or the code but they are perfectly capable of detecting the last day of the month.

You have cron fire up a job 28-31 every month, have that job use the date script to figure out if its the last day of the month and if so execute your script.

Glad you have a sense of humor too.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Hein van den Heuvel
Honored Contributor

Re: declare multiple date in jil autosys

Dear autosys,

Best I can tell autosys is a platform independent load balancing script engine.

You are asking an incomplete question about it in an HPUX forum. Most readers here will not have heard about autosys, and your question is probably platform independent.

I would encourage you to seek out an autosys forum, or... shudder... read its documentation / help files... or engage its support system. You are paying for it right? So request the help you deserve!

Finally a hint towards your question...
The start of a month is easy right? 1-Jan, 1-Feb, 1-Mar...
The end of a month is simply the start of next month minus 1 day! Independenty of whether the month is 28 days, 31 days, leapyear or not.

Cheers,
Hein.



unixdaddy
Trusted Contributor

Re: declare multiple date in jil autosys

The guys are correc this has nothing to do with HPUX. However autosys comes with calendar feature - 'autocal' which starts the calendar GUI or click on the calendar button in the Autosys GUI control panel or from the command line 'autocal_asc' command.

You can specify dates and give (that group of dates) a name i.e. end_of_month You then reference the calendar name you've created in the job that you are going to create using the run_calendar or exclude_calender attributes.

So the job will either run on the day specified or not run on the day specified.
Pete Randall
Outstanding Contributor

Re: declare multiple date in jil autosys

And, as long as my name has been mentioned, I'll chime in, too.

What is a "jil" script. My wife's name is Jil, but I don't think you want one of her scripts.


Pete

Pete
Patrick Wallek
Honored Contributor

Re: declare multiple date in jil autosys

Pete,

In this case 'jil' is referring to a job script that is configured within Autosys to run certain jobs, or series of jobs.

Autosys can do some faily sophisticated job scheduling. Jobs can run based on other jobs status and you have some greater flexibility for scheduling than with cron.
Patrick Wallek
Honored Contributor

Re: declare multiple date in jil autosys

P.S. JIL = Job Information Language
unixdaddy
Trusted Contributor

Re: declare multiple date in jil autosys

I forgot to mention if you want to update jobs then you can do this:-

if you have oracle you can, change 'job_name' to whatever field (or fields) you want to extract:-

1) $ORACLE_HOME/bin/sqlplus -s autosys/ <<-!@#
whenever sqlerror exit 1
set echo off
set flush on
set feedback off
set heading off
set linesize 1024
set pagesize 0
set pause off
set scan off
set trimout on
set verify off
select job_name from job
/
exit
!@#

or

use xql facility change required field (also uses wildcards) i.e
xql -Uautosys -P -c \
"select job_name from job where job_name like 'ACT%'">job_list_file

or

(complete configuration for all jobs)
autorep -J ALL -q > autosys.jobs

2. edit job_list_file and change whatever you want.

3. update in JIL

*To Change the machine the jobs will run on (change 'machine' attribute to whatever attribute you wish to update)

cat job_list_file |while read job_name
do
echo "update_job: $job_name"
echo "machine: {desired machine_name}"
done | jil -v batch

also

jil < autosys.jobs works as long as you specify the "update_job: job_name" and then attribute to be changed.

regards