Autosys command

http://support.ca.com/phpdocs/0/common/impcd/r11/troubleshooting/doc/autsys_diag_tips_110607.pdf 

autsys_diag_tips_110607.pdf

http://writetrends.files.wordpress.com/2009/09/autosys-edk2uaj45cie.pdf

Unicenter AutoSys Job Management

查看错误:

autorep -J jobname -d

 

 

 

FYI:

If you guys need to install autosys jobs in UAT


Login into UAT box

Then scsu - apollotrs

Then change to ksh shell
[apollotrs@pecdlnx1u scripts]$ ksh
$ . ~autosys/.profile


$ . ~autosys/.profile

. ~autosys/.profile

cd /export/opt/NellyTRS/rel_ver/autosys/uat

autorep -j 158459%

LOADING JOBS
BOX:
jil < 158459_EODDataLoadAndCalculations_Box.jil

jil < 158459_Snapshot_UserData.jil
jil < 158459_Snapshot_InFeedData.jil
jil < 158459_Snapshot_TradeData.jil

CHECK THE STATUS OF JOBS

BOX:
autorep -J 158459_EODCalculations_Box

autorep -J 158459_Snapshot_UserData
autorep -J 158459_Snapshot_InFeedData
autorep -J 158459_Snapshot_TradeData
autorep -J 158459_EOD_Calculations
autorep -J 158459_OasysFeeds_Generator
autorep -J 158459_OasysFeeds_FTPSender
autorep -J 158459_Snapshot_Purge
autorep -J 158459_PTRSDailyReportBatch

 

FORCE STARTING JOBS
BOX:
sendevent -J 158459_EODCalculations_Box -E FORCE_STARTJOB

sendevent -J 158459_Snapshot_UserData -E FORCE_STARTJOB
sendevent -J 158459_Snapshot_InFeedData -E FORCE_STARTJOB
sendevent -J 158459_Snapshot_TradeData -E FORCE_STARTJOB
sendevent -J 158459_EOD_Calculations -E FORCE_STARTJOB
sendevent -J 158459_OasysFeeds_Generator -E FORCE_STARTJOB
sendevent -J 158459_OasysFeeds_FTPSender -E FORCE_STARTJOB
sendevent -J 158459_Snapshot_Purge -E FORCE_STARTJOB

DELETE JOBS
BOX:
sendevent -J 158459_EODCalculations_Box -E DELETEJOB

sendevent -J 158459_Snapshot_UserData -E DELETEJOB
sendevent -J 158459_Snapshot_InFeedData -E DELETEJOB
sendevent -J 158459_Snapshot_TradeData -E DELETEJOB
sendevent -J 158459_EOD_Calculations -E DELETEJOB
sendevent -J 158459_OasysFeeds_Generator -E DELETEJOB
sendevent -J 158459_OasysFeeds_FTPSender -E DELETEJOB

sendevent -J 158459_PTRSDailyReportBatch -E DELETEJOB


 jil 
jil>>1> delete_job: 158459_MStopScdApolloService  job_type: c
jil>>2> /
jil>>3> exit

 

JOB ON ICE

sendevent -J 158459_MStopScdApolloService -E JOB_ON_ICE
sendevent -J 158459_MStartScdApolloService -E JOB_ON_ICE
sendevent -J 158459_Snapshot_Purge -E JOB_ON_ICE


cd ../../log/autosyslog

cd ../../autosys/uat

autorep -q -J


===================================
Login UAT
scsu apollotrs
ksh
. ~autosys/.profile


/* Query autosysy job information */
autorep -J 158459_LCDX_Price_Load -q


/* Insert, update or delete autosys job */
jil < /home/yg14134/test/158459_LCDX_Price_Load.jil -V none


/* start a autosys job */
sendevent -E FORCE_STARTJOB -J 158459_LCDX_Price_Load

/* Query autosysy job runing status */
autorep  -J 33684GDMG_LQT_RefreshDB  -d

====================================

sendevent -E STARTJOB -J job_name,
sendevent -E FORCE_STARTJOB -J job_name, [JOB_ON_ICE, JOB_OFF_ICE, JOB_ON_HOLD, JOB_OFF_HOLD, SET_GLOBAL, STOP_DEMON. . . .]
sendevent -E STOP_DEMON - to stop AutoSys
   (ex: sendevent -E SET_GLOBAL -G "var_name=/home/mydir" to set a var)
   (ex: sendevent -E SET_GLOBAL -G "var_name=DELETE" to delete a var)]
  
  
  
 ========================================
  sendevent -E event [-S autoserv_instance] [-A alarm][-J job_name] [-s status] [-C comment] [-P priority][-M max_send_trys] [-q job_queue_priority][-T "time_of_event"] [-G "global_name=value"][-k signal_number(s)] [-u]
CHANGE_STATUS - Forces a change in the status of the job specified in job_name. Ordinarily this should not be used, since AutoSys manages job state changes internally. If this option is selected, the -s status option must also be
              selected.
 -s status
              Specifies the status to which the job specified in job_name should be changed. This option is used only when the specified event is CHANGE_STATUS, which requires this option.

              These are the valid statuses: RUNNING, STARTING, SUCCESS, FAILURE, INACTIVE, and TERMINATED.

              Changing the status to RUNNING does not cause the job to run. It only changes the systemas current notion of the status of the job. Therefore, this option should be used with caution. Changing the state of a box to INACTIVE  will
              recursively cause all the jobs in the box to also be changed to INACTIVE.

ex:sendevent -E CHANGE_STATUS -J 158459_Test_FW -s FAILURE


EXAMPLES
       To start a job named test_install that has no starting conditions specified (and therefore must be started manually), enter this:

       sendevent -J test_install -E STARTJOB

       To force a job to start named wait_job, which is waiting on the completion of another job, and explain the reasons for your action, enter this:

       sendevent -J wait_job -E FORCE_STARTJOB-C "tired of waiting, so forced it"

       To change the status of a job called ready_to_run to ON_HOLD to prevent its execution, and to assign the sendevent command a high priority so it will be sent immediately, enter this:

       sendevent -J ready_to_run -E JOB_ON_HOLD -P 1

       When you want the above job to run, enter this:

       sendevent -J ready_to_run -E JOB_OFF_HOLD

       To  prevent  a job called lock_out from running between the hours of 11:00 a.m. and 2:00 p.m., a pair of sendevent commands could be used to place it on hold during that time. (These same sendevent commands could be placed in a job that
       is run daily to perpetuate this condition on a regular basis.)

       To put the job on hold at 11:00 a.m., enter this:

       sendevent -J lock_out -E JOB_ON_HOLD -T "11/08/1997 11:00"

       To take the job off hold at 2:00 p.m., enter this:

       sendevent -J lock_out -E JOB_OFF_HOLD -T "11/08/1997 14:00"

       To write a comment into the Event Processor log file, enter this:

       sendevent -E COMMENT -C "have not receivedEOD files - an hour late again"

       To stop the Event Processor at 2:30 a.m. on November 9, 1997 (it is always a good idea to attach a comment to this event), enter this:

       sendevent -E STOP_DEMON -T "11/09/1997 02:30" -C "stopped for upgrade"

       To change a job called resource_hog to a lower priority (it is currently at 1 and is not yet running), and to only issue the sendevent command 5 times, rather than letting it try indefinitely, enter this:

       sendevent -J resource_hog -E CHANGE_PRIORITY-q 10 -M 5

       Notice that the above command will only change the job queue priority for the next run of the job.

       To kill a job named wrong_job which is running on another AutoSys instance called PRD, enter this:

       sendevent -J wrong_job -E KILLJOB -S PRD

       To set a global variable named today having a value of 12/25/1997, enter this:

       sendevent -E SET_GLOBAL -G "today=12/25/1997"

       To delete the global variable named today, enter this:

       sendevent -E SET_GLOBAL -G "today=DELETE"

       To send the Unix signal number 1 to a job named RunData, enter this:

       sendevent -E SEND_SIGNAL -j RunData -k 1

       To cancel all unprocessed JOB_OFF_HOLD events for a job named RunData, enter this:

       sendevent -E JOB_OFF_HOLD -j RunData -u

 

since the job 158459_FxRateUpload is on ice
ist always SUCCESS


put on ice mean the s(this job) alway return success, so it woundn't affect other job.
put on hold mean the s(this job) alway return fail, so other job would start if depend on it.
mark succes, it will trigger all job which depend on , will start imediat. but if other job have start time, it will start again.

你可能感兴趣的:(command,delete,query,generator,jobs,Signal)