Home

jobsched_cmd user guide - Mark Dickinsons Website

image

Contents

1. SCHED SHOWSESSIONS SCHED EXECJOBS OFF SCHED EXECJOBS ON SCHED SHUTDOWN SCHED SHUTDOWN FORCEDOWN READ THE MANUAL FIRST SCHED LICENSE COMPANY company SERVERNAME servername EXPIRES yyyymmdd KEY hex SCHED CATCHUP ALLDAYS SCHED CATCHUP NONE SCHED NEWDAYTIME hh mm SCHED NEWDAYPAUSEACTION ALERT SCHED NEWDAYPAUSEACTION DEPWAIT SCHED FULLDETAILS ON SCHED FULLDETAILS OFF SCHED ALERT FORWARDING ACTION OFF EXTERNALCMD SCHED ALERT FORWARDING EXECRAISECMD full program path SCHED ALERT FORWARDING EXECCANCELCMD full program path USER ADD username PASSWORD password AUTH ADMIN OPERATOR JOB SECURITY AUTOAUTH YES NO SUBSETADDAUTH YES NO ADMIN USERLIST lt 1 gt lt 2 gt lt 10 gt DESC descriotion text USER DELETE username USER PASSWORD username newpassword USER INFO username Page 39 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 16 Obtaining Support Mark Dickinsons job scheduler is now released as free software As such there is no longer any dedicated support for this application Refer to the site you downloaded the software from for user forum information at the time of this documents creation only m
2. hen the scheduler newday will sing that has been missed until current days date olonged scheduler downtime r jobs tha r a given day sically 1 If the catchup flag is ALLDAYS t repeatedly run for each days proces eventually it reached th 2 If the catchup flag is NONE th current batch day then be normally would run after the current days da As th intend to the alldays flag should o perform their own time management via too hard as instead of scripts doing a with a rundate in it and have the las change it but I m leaving that up to The default at install time is ALLDAY The recommendation for non production f scheduler does not currently adjust system times scheduler newday will run in the rescheduled to the next time it te and does not nly ever be used if ALL your jobs control files This is not actual date request they could cat a fil t batch job in a daily stream how you want to run it A Le Six servers NONI zal is Page 30 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 To change the catchup flag value use one of the commands SCHED CATCHUP ALLDAYS SCHED CATCHUP NONE 11 3 Changing the scheduler newday time Only a user logged on with Administrator privilage can use this command Once a day the system task SCHEDULER NEWDAY will run to clean up data files and submit onto the ac
3. You may use the same name for a job calendar and holiday calendar if desired for clarity as they will still be unique by calendar type calendar it must be between The TYPE may be JOB or HOLIDAY A JO The description XXX may be any description up to 40 bytes describing the characters B calendar contains dates a job will execute on a HOLIDAY calendar is used to define dates a job will NOT execute on he year is also part of the cal hat calendars do not accidental alendar 2002 expires it will t has a new set of dates if calendar error state This H will use the holiday calendar T t perspective ie if a job uses cal o i n 2003 all calendars for 2002 will lendar key It MUST be provided It ensures Lly wrap across years from the job execution lendar JOB1 CAL in 2002 when the look for a JOB CAL1 for 2003 if found good not found the job will be placed into a is also used to maintain the database as for th L be purged IMPORTANT A job will use a calendar for it s current year the calendar before th current year etc Ensure you have your next years calendars in plac calendars 6 4 Changing Calendar Values nd of the year if you are using 6 4 1 Adding extra days into a calendar Once a calendar has been created you may add additional execution dates to it with the CALENDAR MERGE command an existing ca
4. 5 1 Defining a job syntax and considerations 5 1 1 Job definition syntax Syntax JOB ADD jobname OWNER unixuser TIME YYYYMMDD HH MM CMD unixcommand PARM parameters to the unix command DEP JOB jobn FILE filen total of five dependencies EP A EATEVERY nn T QAQU0D AYS ATCHUP YES NO AL T MON TUE SUN DESC description with no commas ENDAR calname The command parameters OWNER TIME CMD PARM Required Identifies the unix userid under which the job will run Required The date and time of the first execution of the job this may be before the current date and time as I have found that usefull for stress testing Required The program or shell script to be run This must the full path name of the file to b xecuted THIS SHOULD NOT INCLUDE ANY PARAMETERS May only be up to 80 characters Optional use only if the program or script needs parameters provided to it Any parameters that need to be passed to the program or shell script These need to be defined here They must be provided within a quote pair There are special internal parameters that may be passed see the section on special parameters 5 1 2 Optional use only if the job being added is to be dependant upon other jobs completing or a file ariiving on the system A list of dependencies that must be
5. it does This ensures the joblogs can b no joblog activity while it is you can find for jobs like thi You may not use it It is created and and any commands issued against it ntended for scheduler maintenance jobs so I could use the scheduler itself to job output logs ns with the following special t will not run if any other job is starts running no other job is t completes running not write any output to a job log file e safely archived as it guarantees running There may be other uses Ss Page 13 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 5 2 Deleting a job Deleting a job removes it from the job definition file Once this is done the job is gone forever never to be scheduled again THIS SHOULD NOT BE CONFUSED wil the command SCHED DELETE which is used to delete a job off the active job queue The JOB DELETE command is forever Syntax JOB DELETE jobname Considerations You cannot delete a job from the database if it is on the scheduler active queue You need to delete it from the scheduler active task queues before deleting it from the job database This means it must be deleted from the alert queues and the scheduler queues if it is on the scheduler queue with the SCHED DELETE jobname command first 5 3 Displaying a list of defined jobs
6. z rosier E EE e EEE AE 18 7 1 1 Display all jobs on the alert Queues vc ctcessscvcresrcaa cat conaveasveanstan ccna tyencakalsdaxewataneiateaeadt 18 7 1 2 Display details for a specific alert ns snnseseseeseessesressesssesresstsseesressessressesserssseresse 18 7 2 Acknowledging an alert oeiesnenaninennnn ea e e E Re Tent thalnrad 18 Peo Restarting a failed JOD mnn pre eaea a Ea a EE N EE EEEa Goes 19 7 4 Forcing a job from alert status to OK status s seeeseeseesesesreseesssseesresseesressessresssrersssreessene 19 8 Dependency queue Man geeme mts cesses alan ciiler duvet ccedeai litle ipandenledvsnoat da deswdlncuadeuevavededeens 21 8 1 Listing all dependencies on the dependency queve eecceecccesseeessceseeeeseeeseeeeseeeseeeeensaeees 21 Page 2 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 8 2 List what jobs are waiting on a dependency MamMe eecceecccesseeseeeteceteeeeseneeeeesneeeeeeeneees 21 8 3 Clearing all dependencies for a specific JOD 1ss 5ssscsvcecousatabsccareerosaees coucavestseate din innesnacnessan een 21 8 4 Forcing a dependency name to be globally satisfied ee eecesceeseeeseeeeneceeeeeeesteeeeeeeeees 22 9 Running job management Commands ss cosistiteesalas sacetdsisn Suaseoael ilar te tdetvaneli ai caagik paver lite 23 9 1 Listing all jobs on the active Queues cass scsccnascces cass cecreivceraeisncdseetvonnr elds danleedveereincesveaielancess 23
7. 9 2 Forcing aJob to RUIN IN W ssr noterien ara er aa O a E A a E E E A na 23 9 3 Placing a JOD Ito a holdistat sssnsicni i i a i oni ecbeadetcawecs 24 9 4 Releasing a job from a hold StALC a cestunccsws coptucorcuaeaenins dens doulsnndbh cndehcoesieesnsaitene dave ssabentetudcetagnlde 24 9 5 Deleting a job from the ac thVesUeUey visseccasncsnsarsutiastncdsollas causes ccnualvevdnasushadsoaiuaradtstavsenastecalics 24 10 Scheduler management Commands s i cccceseisscosc5s ccuseeseesasstgctew clans se eusst eu deeensusevear ees cdeveag anaes 26 10 1 Displaying the server SAU cae cst sss cere scence edie oesste ode snseabon a oaeuicaoaa he assed cansedeietandawvcotones 26 10 2 Displaying connected sessions with The Serveriin gos daeceveepadaciennir a Wariakwoatare 26 10 3 Preventing further jobs from ex CCUG 5c crsivs vastceseccenaivunverd lacwines cesvencad dovenc ca luiaebecsntenehans 26 10 4 Allowing jobs to start executing reverse Of 10 3 ceceecceseeseeeseeeeeeeeeeeeeeeteeeeseeeeeeeeeeeas 27 10 5 Shutting down the server normally sssssssesessseessesseesresetsssesessessrssressesseesressesseeseressseeesse 27 10 6 Shutting down the server with a FORCEDOWXN s sssssssssssesesseserssesressessresressreessreessseeesse 27 11 Important Scheduler configuration commands ccceecccesseesseceseeeeseceseeeeeceaeeeseeceaeesseeenseeesaees 29 Li dc Adding anew license Key es cicucpare bs sccieccspcteee tone enions a eee depict ianteh eases 2
8. A command to delete a dependency across all jobs waiting for it has been provided for this eventuality This is the command DEP CLEARALL DEP depname where is the full dependencyname whether jobname or filename that you have deterimined is just not going to be satisfied in the current days batch run This command will for each job waiting on the specific dependency named have that specific dependency marked as satisfied No other dependencies jobs may be waiting on will be affected for jobs being modified Page 23 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 9 Running job management commands 9 1 Listing all jobs on the active queue To list all jobs on the current scheduler active queue use the command SCHED LISTALL jobmask Using a wildcard mask can be used to limit the response returned for example to display test jobs all following the naming standard TEST JOB xxx you could enter SCHED LISTALL TEST JOB This command only displays jobs still on the active scheduler queue those running waiting to run or in failed state It does not provide information on jobs that have completed as they are of no interest to the active schedule queue anymore Note your administrator can turn on the display of completed deleted jobs but that is primarily a debugging tool and not enabled by default If you do see completed jobs when y
9. AAAANAAANAAAADA eS Be ee ee AISTAL AISTWAIT CLEARALL JOB jobna vooU CLEARALL DEP depna SCHE SCHI SCHI SCHI SCHE SCHI AISTALL RUNNOW jobname HOLD ON jobname HOLD OFF jobname DELETE jobname STATUS jobmask y be one of HSDAYS MM ALL JAN FEB D r EC L FIRS ESC desc test with no commas L FIRST H aK H xk MANUAL FIRST AL HOLIDAY YEAR YYYY HOLCAL name format string AR YYYY format string JOB HOLIDAY Y EAR YYYY EAR YYYY format string DD MM DD MM DD MM DD MM DD MM DD DD DD DD DD AMES SUN MON TU E W server mal utility library job defini api calls alert queue management n code block calendar processing active queue and dependency queue functions tion database functions D THU FRI SAT data structure checking library user record functions memory management library EA EA NEJ THE THE R R me me Oo E READ THE READ THE MANUAI MANUAI MANUA MANUA Beak Li ET Li L FIRS L FIRS RSI RST H aK 5 KKK KKK KKK Page 38 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011
10. aplibens 6 3 Syntax for running the jobsched_cmd program cccccccsssscesrcssencssccerecsestsesetedenscecsseacsecsssenecoses 7 4 User definition and management caccsuccss ties ititen deel neue eug ue tive On het nerts tual ee iendves has 8 AA User Management orinni e gaetaisscues taaseueusueveeuta E e aa aai 8 AA A Adding TOW USET Su ene aE EE EE RE EA E E RA E 8 44 2 Deleting AMUSE rio i E E E E E E Nes a T EES 9 4 4 3 Changing a user password ssesesssssssesseeseesresseesersresstestsressresttsresstesressesseesressesseesse 9 AAA Displaying USED record aieeao eei n e a e a E Ea E 9 5 Job definition and management sseseesesesseseeseessreseessesstesrtsstsstessrsstesresstesttsressrestesressreseessseresst 10 5 0 Who can define and delete jJObs nnnssssoseeeseesrosseesetsresseesetsetsseeserssessresesseesreesssresssrresserens 10 5 1 Defining a job syntax and considerations iesg cde ary tee an eiediane 10 5 1 Job definition Syntax seon einsa E AR EEEN aa evs EERDE 10 5 1 2 Special parameters a job May Use oseseessesseeseesseesreseessesetsssesesssessseresssreesssreesseee 11 53 EXaMmple Srne a nia a a ee ait a a aaas 12 5 1 4 Reserved and Special Job Names ec gies veeve ces sucaeevacvees use Soasedsscdanecaidosasvcbeassavceouameasives 12 5 2 Deleting AJOD czas sehcded stair ani a ae sbbd i E A tua tha E E E EE 13 5 3 Displaying a list of defined ODS asicicacsiaincrcsusivisalecaioadyiistavededut
11. during the current days processing it will 1 be automatically scheduled on again in the next newdays processing as its next runtime indicates it needs to be run this may fail as calendar checking may block it when implemented 2 If it is a daily job until it is at some point manually scheduled on to run twice in a day its next run time will always be one day behind To summarise the above two points unless you are deleting the job from the scheduler active queue with the intent to also immediately delete it from the jobs file don t do it The command syntax is SCHED DELETE jobname where jobname is the name of the job on the scheduler active job queue Page 26 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 10 Scheduler management commands 10 1 Displaying the server status The server internal settings and configuration flags can be displayed using the command SCHED STATUS This returns information such as server version hostname it is licensed for the license key and company information and more importantly whether the server is enabled to run jobs what the log level is set to what debugging levels are in effect is the server is pending a shutdown and so forth 10 2 Displaying connected sessions with the server This command is more a debugging tool than a provider of usefull information It lists the current connect
12. it state dency list as appropriate until the last job on the scheduler active queue has completed This method is for a hands off site where t he bat ch running late is not considered to be something that needs looking into The commands to change this setting are SCHED NEWDAYPAUSEACTION ALERT SCHED NEWDAYPAUSEACTION DEPWAIT The default when installed is DEPWAIT Page 31 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 12 Alert Forwarding 12 1 Overview of function Obviously we all monitor alerts from all our distributed servers at one central point So methods to provide any job scheduler alerts to be passed to other applications can be configured A Basically The job scheduler will allow you to run external scripts to process and forward alerts so you can for example setup a script to forward the alerts to Tivoli by running a script to format a command to the Tivoli tool you are currently using for centralised alert monitoring postemsg program or any other Forwarding off no alerts are forwarded Forwarding on Forwarding externalcmd will alerts are forwarded natively across tcpip sockets only usefull to receive The option if you have some of my other products and process the raw data don t use this has been removed from the shipped release run the scripts you
13. multiple servers If the optional port number is not provided then the connection will be attempted to the same port number as you initially connected on with the new ip address OPEN ipaddr portnumber Examples OPEN 127 0 0 1 9002 OPEN 169 5 6 7 13 2 OPEN information If the OPEN command is used with the INFO option then the current server connection information will be displayed justthe ipaddr and port number your current session is connected to OPEN INFO note sched showsessions is used to display all connected sessions Page 34 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 14 Server Debugging Facility 14 1 When to debug the server As a general rule you will only need to debug the server when you are experiencing problems have raised a fault and have been asked to turn debugging on while you try to recreate a problem you have exprienced As the debuging levels can be set specific to individual library modules it is best to seek advise before turning debugging on so the author can let you know which modules he wants additional information from turning debugging on all modules will generally produce a trace too large to be of any use and is not recomended 14 2 How the debugging levels work The debug levels can be set individually on library components used to build the server this allows debugging to be switched on for
14. of this is that jobs scheduled for TUE SUN will not be scheduled on each day SO DON T DO IT Scheduling is done automatically see below If you have just added a new job that has a date timestamp for the current days run you can add it to the current days active queue with the command JOB SUBMIT jobname where jobname is the name of the job you have just added 5 6 Automatic scheduling on of jobs how it works An internal job SCHEDULER NEWDAY runs each day at or after the time configured to the server as the newday time It may run late if there are still jobs on the active queue waiting to run it will wait until all jobs have completed other that itself before running This job scheduler system is based around production days where an entir days work must be completed before the next days work is scheduled on If at the time the newday job is scheduled to run the newday job will either go into alert state or just add to itself a dependency of one of the jobs still on the queue Which action is taken depends upon how you have the server configured the newday failaction is user configurable When all previous days jobs have completed the newday task will scan the jobdatabase file and automatically schedule on all jobs that were due to run within the next 24hour period of its scheduled as opposed to actual start time I f the newday job was configured to
15. or script being executed so you will need to refer to the documentation for the program or script to determine why the exit code was generated Your job scheduler adminsitrator may have used the alert customisation table when installing the scheduler in which case you may actually see meaningfull text for the error description if you get in the alert description field no text for error then they have not yet done that But setting that up is in the job scheduler daemon manual and only for the administrator to play with 7 2 Acknowledging an alert When an alert is written to the queue it is in an unacknowledged state Acknowledging an alert really has no effect on the scheduler but is usefull for monitoring interfaces ie the supplied sample monitoring interfaces can display the alert in yellow instead of red once it has been acknowledged To acknowledge an alert use the command Page 19 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 ALERT ACK jobname where jobname is the name of the job on the alert queue you intend to acknowledge 7 3 Restarting a failed job Restarting a job assumes that the job can be rerun from the start All jobs run by the scheduler should be able to be restarted from the beginning without causing problems See the job scheduler job writing guide manual for that also obvously assumes you have fixed the problem that caus
16. preovided within a quote block Each dependency must identify whether it is a physical disk file or scheduler scheduler jobname prior to the dependency value The dependency may be another job scheduler job name job will wait until that prior job completed or a unix filename job will wait until file exists and hasn t been modified for 5mins to stop job trigerring while file being waited Page 11 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 on is still A jobname may be 30 characters AT EV ERY Optional being written to by whatever created it a filename 80 characters use only if job is to repeat every nn minutes If this parameter is define the job will be created as a automatically requeueing job that will ru See the Considerations below expect Optional weekdays to run on quote block ah ys Optional A description for description is not No decsription en The default is yes configured with ca for each scheduler next scheduled range that delet DAYS CATCHUP The datnames are MON TUE but should be used the job WIT provided tered A list of daynames it may no n every nn minutes t work as you use only if a job is to run on specific that this job is permitted if provided the dayname list must be within a WED THU FR
17. select on a raise alert or ca ncel alert event GIVING YOU FULL CONTROL OF WHERE TH EY GO 12 2 Selecting the alert forwarding mode This is done with t The options to the ON use eff F he SCHED AL ERT FORWARDING ACTION command command are my proprie icent but tary native tcp ip protocol most not portable do not use this unless on a site I support it is also being phased out Fun OFF do but EXTERNALCMD run you Thi mon ctionality no alert fo no alert f an externa to use any s you would removed from the shipped release rwarding the default more efficient orwarding l script to do the forwarding allowing vendors product to forward alerts use if you already have centralised itoring in place and your alert application has a command line interface This has the most overhead as a fork must be done for each alert however if your bat ch jobs run occurence correctly alerts will be a rare Syntax SCHED ALERT FORWARDING ACTION ON OFF EXTERNALCMD See section 12 5 on how to specify the actual scripts to be run when using the external command feature 12 3 Using no alert forwarding This is the default value when installed With no alert forwarding in effect all the alerts are stored locally only In small sites this is Page 32 of 40 jobsched_cmd user manual M
18. year type name and description for each calendar in the server database CALENDAR LISTALL calmask The optional calmask can be used to select entries by wildcard to limit the amount of responses returned ie IRST would find FIRST OF MONTH 6 7 Displaying details of a calendar To display detailed on a specific calendar entry use the command below It will display a the yearly table of execution dates for the calendar CALENDAR INFO calname TYPE JOB HOLIDAY YEAR YYYY Page 18 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 7 Managing jobs in alert status 7 1 Displaying the alert queue 7 1 1 Display all jobs on the alert queue A summary of all jobs currently on the alert queue is generated with the follwoing command ALERT LISTALL If no alerts are on the queue an empty display will be returned If there are alerts they are returned in the following format 7 1 2 Display details for a specific alert To find out more details on an alert the command ALERT INFO jobname Where is the name of the failed job will display the detailed information for the alert Common errors would be exit code 127 program to be run was not found or a signal error indicating the program was killed with the signal number in the detailed display As a general rule any other exit code will be the exit code returned by the program
19. 0 bytes in total INFO MI006 Since last newday 1 malloc and 1 free calls from stack calls INFO MI004 Memory display ended 14 6 Displaying why a scheduled job was deleted Only a user default displ users logged on with Administrator privilage can change the lay method configuration entry This change affects all it is a server setting not a session setting Up until this release the command line interface always displayed ina SCHED LISTALL command why a job was considered complete This may be because it had compleded normally or usefull for me in testing displays if it was completed while still in dependency wait in alert state still in time wait etc There may be occasions when you still want to see this information which is now not displayed by default iD r TAI This can be toggled by SCHED FU iS ON SCHED FU iD F TAL iS OFF The supplied browser samples handle both as it has been coded to discard the full details info if present in the output With the toggle ON jobs that have been completed or deleted will be displayed with the SCHED LISTALL command If the toggle is OFF only executing or waiting to execute jobs will be displayed Page 37 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 This sectio with the using the command before actual JO B 15 C
20. 9 11 2 Changing the scheduler job catchup Option cccescceeceeseceseeeeseceseeeeeeeseeeeseeneeenseeneeeees 29 11 3 Changing the scheduler new day Tie trace suse jc8 dered atic catia cy uae Su asco Ut ue Aaa sual eas 30 11 4 Changing how the scheduler handles newday conflicts cccecseesscceeseceeesteeeeesteeeeeeaes 30 LD ARNT FOL W APUG cae i octal cpl a aer a O Ee a a EEE a aaee EEEE th Ea 31 TDD Oyerview of UNCION 5 csr aia a inane E RE E ER T AE Alea S AT 31 12 2 Selecting the alert forwarding mode ns sssesesseseesssesreseesssssresstssresessesseesressessresressseeesse 31 12 3 Usmg MO ASL forwarding nesses ia o a A a a a EN a a E aa 31 12 4 Using native alert Torwardine xc ccrontcsincassecaterd cucinaciaus eusidecs aaesstieeneasisaaisaWavevisecigeaeuermatcs 32 12 5 Forwarding alerts using external shell SCTIpts ccceesccesseeeseceseeeeseeeeeeeseceeeeeneeneeenneenes 32 To WHSC Cl AMC OUS ComimandsS eti iren telat st LER oA OS Bian BBO Ti A oe Deel Daal aie 33 13 1 OPEN ew Server command sssini ipie ninii andini a aaa iiini 33 T3 X OPEN Ii PORTA tim succes carats henee e E a aa a A na E a RE Mees 33 14 Server Debugging Facilityss cenen ean a a A a EE AES 34 14 1 When He I the SERVIC ereraa hoot tia aes guide Mace a tvs peas Uadaneas 34 14 2 How the debugging levels Wek eu ssccsaisees aiuassensves ieceatbeaat shah onschians des asabatenehievarmudemamakinanees 34 14 3 Changing the debugging levels at a library l
21. I will which is tchup on then the job H NO COMMAS for a job the be used and be three character names seperated by SAT and SUN nyse TE a entry that when th scheduler is will be executed newday catchup done as long as it s cycles CALENDAR g scheduling times Considerations Lf it of t If REPEATEVERY and DAYS are bo the days specified The name of a calendar to be used to co A maximum of five 5 as known to the scheduler Five in total REPEATEVERY considerations jobs requeue to the nex minutes but takes 20 mi minutes or slo dependencies ar nutes to ru a execution slot is missed as it ran past it If ajo n th repeat jobs will not be the job is after the sc start running again af So don t use for jobs File dependencies are ch cked b is set e effect ER N EWDAY EDUL released just because a being checked has not be that things like 60 minu rather than that a file is released This is normal ile exists n modified in over five minutes very 5 mi but te ftp s actually complet triggering the second the file is created can be on a system for up to 10 minutes befor 5 1 2 Special parameters a job may use nutes will wai run rundate remains within the execution date Using CATCHUP NO for jobs such as dis
22. Page 8 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 4 User definition and management 4 4 User Management 4 4 1 Adding new users Some users may not have that case you must pick native unix userid then as that can be used for a meaningf aoutologi unix passwords if using the PC GUI in ull name If they do have a you should use that as their username n if desired If the user has a unix password an then that user may use the autolo password NOTE that autoauth is do running the jobsched_ cmd program o user autoauth if their userids are servers also as the autoauth func with autoauth can use the dev mach schedules on production machines The AUTOAUTH function should be se systems administrators never for users US ea R ADD username PASSWORD somepa AUTH ADMIN OPERATOR JOB SECUR AUTOAUTH YES NO SUBSETADDAUT USERLIST lt 1 gt lt 2 gt lt 10 gt DES username can be any arbitrary nam is to be permitted autoauth acc unix userid as in the etc passw autoauth function the contents of the jobsched_ cmd program to fill LOCAL SERVER the jobsched_cmd is password must be at least six cha AUTH levels are defined as ADMIN all access SECURITY user management on JOB job definition man OPERATOR BROWSE display only acces AUTOAUTH is YES no passord requi
23. To display a list of all jobs in the job defininition database use the jobsched_ cmd command JOB LISTALL jobmask The optional jobmask allows you to display only a subset of jobs for example to display only jobs of the form TEST JOB xxx you can enter the jobsched_ cmd JOB LISTALL TEST JOB 5 4 Displaying a defined jobs details The full definition details of any job in the job details database can be displayed with the JOB INFO command JOB INFO jobname Where jobname is the jobname you wish to display the details for 5 5 Submitting a job manually and why it may be bad It is possible to manually schedule a job onto the active queue This is inadvisable unless it is a new job you have just added that you wish to run under the current days schedule If you manually schedule a job on it will be moved to the active queue NOT FOR THE CURRENT DAY but scheduled to run at the next time it would have normally been automatically scheduled to run for THIS IS BAD Page 14 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 WHY IS THIS BAD The scheduler newday task will not run until all jobs scheduled for the current business day have completed running It on monday you manually schedule on a task that is due to run on a sunday that job will go into time wait until sunday preventing the newday task from running The effect
24. an individual function of the server when trying to narrow down a problem There are multiple levels that can be used from 0 9 9 producing the most information and 9 should never be used unless you have a spare 5 10gb of disk space for the log file What each numeric level provides in the current release is shown in section 14 5 The debug information is written out to the standard log file for the current day 14 3 Changing the debugging levels at a library level Only a user logged on with Administrator privilage can use these commands m o enable debugging messages to be written use the command DEBUG The options are explained immediately below the values for the current release are documented in 14 5 DEBUG SERVER n server main code block DEBUG UTILS n utility library DEBUG JOBSLIB n job definition database functions DEBUG APILIB n api calls DEBUG ALERTLIB n alert queue management DEBUG CALENDAR n calendar processing DEBUG SCHEDLIB n active queue and dependency queue functions DEBUG BULLETPROOF n data structure checking library DEBUG USERS n user record functions DEBUG MEMORY n memory library functions Notes The SCHED STATUS command will display what the current log level Page 35 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Di
25. arks Job Scheduler is copyright Mark Dickinson 2001 2011 unlikely to be an issue as the supplied sample web pages show you how to view alerts across multiple systems although they have a high overhead Alerts are only viewable through the job scheduler command or web page interfaces If no alert forwarding is used you can skip this section as none of the forwarding parameters will affect you To turn alert forwarding off the default from an administration user signon enter the command SCHED ALERT FORWARDING ACTION OFF 12 4 Using native alert forwarding Disabled in this release Being removed from the code as being too proprietory to be usefull to anybody else 12 5 Forwarding alerts using external shell scripts This is the prefered method of forwarding alerts as it allows you full control of where they are sent and allows you to forward the alerts to existing alert monitoring systems you employ at your site You specify the shell script or command to be run when an alert is raised and when an alert is cancelled The shell scripts are passed the name of the job involved in the alert as 1 and any meaningfull text in 2 This allows you to fully customise how you handle alerts from the scheduler and allows you to forward on both alert events and alert cancellation events to any monitoring tools you have in place that allow a command line interface to be run Sample scripts are
26. b Scheduler is copyright Mark Dickinson 2001 2011 TIMESTAMPS it is not possible to resubmit the job for the current day If the actual intent is to allow other jobs to begin running while this one is fixed then you should use the dependency queue commands to release dependencies from waiting jobs allowing them to run rather than forceOKing the alert state job off the system Thie dependency releases would allow the other jobs to run and the alert job to still be restarted when the problem is fixed Page 21 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 8 Dependency queue management 8 1 Listing all dependencies on the dependency queue To list all dependencies still outstanding for the current days processing use the command DEP LISTALL which will list the jobnames in the dependency queue and what dependencies each job is waiting for Example command DEP LISTALL Job TEST FILE DEP is waiting on FILE home mark scheduler testing trigger Job TEST JOB DEP is waiting on JOB TEST FILE DEP JOB TEST FAIL AND RESTART Job SCHEDULER NEWDAY is waiting on JOB TEST FILE DEP a E 8 2 List what jobs are waiting on a dependency name To see what impact globally clearing a dependency will have on the current days scheduling the command DEP LISTWAIT dep
27. bnormally termina ted and best of all it gets databases in a normal manner the scheduler knows all jobs it was to close its The unhappy side effect is that any subtasks spawned by child programs or scripts will will probabl be used i supplied etc re d ini The comma na real system nd is never to tedo SGript shutdown or runlevel change be manually used please continue running and unless it is a system shutdown sutuation ly complete running quite happily so this command should only and only from the Please don t manually run it here the down a logic are in the SCHED SHUTDOWN FORCEDOWN Considerations As all running jobs are flagged into alert state they must be MANUALLY checked when the system is restarted Visulal inspection is required to determine whether the appropriate action for the job will be an ALERT RESTART or an ALERT FORCEOK Notes If the machine hangs freezes or is fast booted etc w etc re d init d script is not run to shut the server check at server startup time will check for jobs that executing state which as the server is only just s should not be possible as it has started no jobs and immediately flag them into alert state In that case considerations above also apply tarting up the Page 29 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 11 Im
28. ckinson 2001 2011 settings are for each component 14 4 Globally changing debugging levels Only a user logged on with Administrator privilage can use these commands It is possible to change the log level for all components with a single command which is oO 7 EBUG ALL n Don t use n 9 with this unless you have a couple of gigabytes free in the job schedulers logging file system Personally I find it most usefull to turn debugging off on all modules when I have finshed a selective debugging sesion I m not sure why you would ever want to globally turn on debugging but it is possible n is as for section 14 3 a number in the range 0 to 9 with 0 being to turn off debuging 14 5 Debug levels currently defined The following debug levels are defined The higher the number n the more debug information will be displayed as all values of n below the selected level will also provide debug information ie if loglevel 4 is used data for levels 4 3 2 and 1 are logged 2003 09 22 added special level 5 for memory library see Note2 no debugging proc call level display IO information record numbers etc variable formatting information memory only used only by the MEMORY module see note 2 below malloc free information obsolete see notel below header dump information record compare information 9 is everything including timer proc calls that occur about eve
29. d port number can be provided when the program is run This could be used as a security option if needed s security issues below This program is currently THE ONLY WAY to communicate with the job scheduler server task GUI development has not yet been started apart from some simple auto refreshing web pages I used to save typing during testing Page 4 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 2 Security issues through use of this program 2 1 Issues that exist currently The job scheduler must run as the root user as it needs to be able to log down to other userids when it s ubmits jobs NEVER setuid the jobsched_cmd program to root ANYWHERE as the root use FROM ANY SYSTEM is always granted full admin access rights to any job scheduler server even if the serve root user was logged on As such there is a very high risk t r is running remotely from where the hat if the jobsched_ cmd interface program it not tightly secured unauthorised user can run commands as root Do DO NOT setuid the jobsched cmd program to root Other users require individual authorisation records to be setup within the job scheduler on each system they are to be granted access to 2 2 Security that has been implemented IN THE SERVER so far The default access level for any new connection is guest This allows browse on
30. e updated just in case the jobs calendar uses the holiday calendar further down the chain If you have a lot of jobs defined expect a big performance hit with calendar commands 6 2 The FORMAT function used to define dates On the calendar commands used to change data in the calendar database a FORMAT parameter must be provided This parameter is used to define the way you wish to define dates to the calendar and the actual dates themselves in the format you have selected The possible format parameters are FORMAT MONTHSDAYS MM DD MM DD MM DD MM DD MM DD FORMAT DAYS ALL JAN FEB DEC DD DD DD DD FORMAT DAYNAMES SUN MON TUE WED THU FRI SAT These are pretty self explainatory the first format allows you to enter dates to the calendar using a month day pair the second allows you to specify individual dates in a month or all months and the third will identify dates for the entire year by day name 6 3 Adding Calendar Entries Page 16 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 The syntax for adding a new calendar CALENDAR ADD calname DESC XXX TYPE JOJ holcalname FORMAT format string T n follows to be enetered on one line try is as B HOLIDAY YEAR YYYY HOLCAL The values of format string were covered in section 6 2 calname is the name of the calendar
31. ed the job to fail in the first place Restarting a job will delete the alert and reschedule the job to be run as soon as the scheduler is able to do so The command to do this is ALERT RESTART jobname where is the job you wish to requeue back onto the execution queue to run again 7 4 Forcing a job from alert status to OK status There will be times where a job is unable to be fixed but you do not wish the batch stream to be held up The forceOK may not be appropriate for this see considerations one of the dependency delete functions may be better in that instance If however you hav xamined the job output of a failed job you may decide that the job did complete OK In this case the forceOK should be used to mark the job completed as it ensures ALL the database flags are updated correctly to indicate completion of the job The forceOK will delete the alert mark the job completed in the scheduler update the job database last runtime to the forceok time mark the jobname dependencies on all jobs waiting for this job as satisfied x If it is a repeating job will requeuve it to the next time The syntax for this command is ALERT FORCEOK jobname where is the name of the job on the alert queu Considerations As this command marks the job OK AND UPDATES THE LAST RUN AND NEXT RUN Page 20 of 40 jobsched_cmd user manual Marks Jo
32. evel ecccceceeeteeeeseeeeeeeeeeeeeeseeeneeeeees 34 14 4 Globally changing debugging levels eee cccceseeeeeeeeeeeeeceeeeeeeeeseeceaeceeeeeeeenseeenaeenes 35 14 5 Debug levels currently defined ciiccsetnagssriacan teenie i acles Mawes ohn a a 35 14 6 Displaying why a scheduled job was deleted eececccecceeseceseeeeeeeseeeeneeceeseeeeeeeeeeeeneaes 36 15 Command Quick REfereNC erreneren tab EEE ENE EE O A AA ET E E icons 37 16 Obtaining Support Page 3 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 1 What this jobsched_cmd program is The jobsched_ cmd program is a command line interface to the job scheduler server task It is totally full function as far as supported server operations are concerned as this program was used to test the server functions and api calls so encompassed all server functions that have been coded so far f The program design is based toward its use in script files as such it works on a fast fail philosophy it dies exits onthe first error as I don t want piped input commands to keep streaming into this program if one has failed as part of a batch job I intend to keep the fast fail policy for this program although it does get a bit annoying during interactive use As the job scheduler server task accepts its commands via a tcpip socket this jobsched_cmd program does not have to reside on the same system as the server as the ip address an
33. go into an alert state then operator intervention would be required to restart it after the last queued job had completed e This method ensures that each days jobs are discretely seperated so operators can easily track them The newday job time is customisable so can acurately relfect when you expect your sites daily batch to complete Page 15 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 6 Calendar Functionality 6 1 Calendar functionality overview Calenders may be used in the following ways A holiday calendar is a calendar that contains dates that any calendar that references it is not to run A holiday calendar may only be attached to a job calendar to override dates in that pre existing calenday not to a job directly A job calendar can be defined with a list of dates that a job is to run It can be created to also refer to a holiday calendar that will override some of those dates A job calendar can only be attached to a job Any Job be defined to use a job calendar will inherit the holiday calendar associated with the job calendar also PERFORMANCE HIT WARNING When a calendar is updated every job record must be checked to see if it needs it s next runtime updated as a result of the calendar change For a job calendar change only the jobs that use the calendar must be updated for a holiday calendar change any job that uses ANY calendar will b
34. ickinson 2001 2011 2 3 Recommended security settings NEVER setuid the jobsched_ cmd program not even on a development system or this would give the development system full admin rights to all your production systems also Only add user records within the job scheduler environment on those systems the user is expected to perform scheduler tasks on DO NOT set up adduser scripts that add users enterprise wid If you use the supplied html pages to monitor the scheduler a userid must be created allowing autologin to the operator level for the unix userid running the web server ie apache ALWAYS ENSURE THE SHELL SCRIPT FILES TO BE EXECUTED ARE TIGHTLY SECURED It serves no purpose to lock down who can add jobs to the server if anybody can edit the script file that is to be executed with their own desired commands It is strongly recomended that your system administrators be assigned individual user records with administrator access If this is not done then all their work will have to be done under the root userid making the audit trail useless 2 4 Default users There are always two default users in the database those are the guest and auto login users You may never delete these if these users are not present the server will attempt to recreate them and if not possible will refuse to run Guest provides a documented profile for guest user
35. ions to the server I suppose suppose it could be usefull if you were trying to track which machines were connected to the scheduler without enabling debugging It also displays the access level of the connected session This will be one of A Admin S Security O Operator J JobAuth or 0 Guest browse only The command is SCHED SHOWSESSIONS Example command SCHED SHOWSESSIONS 127 0 0 1 32778 default access level A 10 3 Preventing further jobs from executing Only a user logged on with Administrator privilage can use this command There may be periods where for whatever reason you wish to suspend job scheduler activity The scheduler command SCHED EXECJOBS OFF will quiesce the job scheduler All currently executing jobs will be allowed to complete but no new jobs will be permitted to start running Note This setting since V1 10 is now remembered through server restarts Page 27 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 10 4 Allowing jobs to start executing reverse of 10 3 Only a user logged on with Administrator privilage can use this command If you have quiesced the server jobs may be pernitted to start executing again with the command SCHED EXECJOBS ON which will allow the server to resume scheduling on jobs 10 5 Shutting down the server normally Only a user logged o
36. job hold flag on This will prevent the job from running until the hold flag is turned off again 9 4 Releasing a job from a hold state If a job has been placed in the hold queue as described in section 8 3 you can use the command SCHED HOLD OFF jobname where jobname is the name of the job on the active queue currently in hold state that you wish to make available for scheduling on again 9 5 Deleting a job from the active queue This command should be used with extreme caution Deleting a job from the active queue is just that it is deleted and may be resubmitted IT IS STILL SCHEDULED FOR THE CURRENT DAY as far as the jobs database is concerned This command should only be used if you also intend to permanently delete the currently existing job record from the job definition database once you have deleted it from the scheduler queue Page 25 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 If a job is deleted it is important to note any alerts for the job will also be deleted any jobs that are dependant upon the job being deleted will immediately have their depencencies satisfied so they can run What will NOT happen is that the jobs last run time and next run time timestamps will not be updated This is the correct handling as the job has not run This means that unless the job is manually submitted back on at some time
37. jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 jobsched cmd user guide A component of Mark Dickinsons Unix Job Scheduler This manual covers the use of the command line interface to Mark Dickinsons unix Job Scheduler This manual is for version V1 13 of Marks Job Scheduler Other reference material available Job Scheduler Daemon Configuration Manual Job Scheduler Messages Manual Job Scheduler Security Manual Job Scheduler Utilities Manual jobsched_take_snapshot jobutil GPLV2 license is at http www gnu org licenses gpl 2 0 html Mark Dickinsons Unix Job Scheduler is copyright Mark Dickinson 2001 2011 Tested under Linux Fedora CentOS and Solaris 2 8 10 and OpenSolaris Page of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 Table of Contents 1 What this jobsched cmd program 18 3si5 2 descr sciwnsd atk edison sincere oaadaniwenrten dau steeanene en 4 2 Security issues through use OF this Programs tscesdendss scedelsbizedcnooten teria shecsetdaeinesbaniecds outa almiecdedavcabavers 5 2 A NSSUES thatexist currentl yanun n aana e a a ns sams as Dain eens alah Uclaa 5 2 2 Security that has been implemented IN THE SERVER 80 fat eeeceesesseesteeesteeeeneeceeeeeenees 5 2 5 RECOMMENAEE security SCHINGS i 04sucystsesentsuaracqutsbanrnes nose cnegelderaniansdducgsdenesoubens i i aA E 6 2A Default USCIS Ainere eee E sedis vends tectaan baie E E A AEE ERa
38. k cleanups files over n days old preve jobs from repeatedly running during the nts those catchup as obviously they only need to run the once ntrol the job This calendar must exist he DAYS option is used and the time provided does not fall on one hose days the server will adjust the date to the next correct day th provided the job will only repeat on permitted This may be job names files you expect to appear on the system not five of each to run every 15 is i t runs every 30 requeued if the next scheduled runtime for heduled SCH ter the newday job has comple hat MUST run every nn mi time it will ted nutes A dependency will not be t until the file b This ensures for the job runs ffect is Th the trigger The following special parameters may be passed as keywords in the job being defined They will be substituted with values at the time the job is executed Page 12 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 DATE If this is provided it will be replaced by the date YYYYMMDD on not the current date scheduler is or for jobs supposed to run running on a new date after need to check for it as per that the job was supposed to run This can be used by any date sensitive jobs when th catching up on any missed days processing after 23 00 that may actually be midnight if the scheduler is busy A
39. lendar The command needs to be en a This command adds extra dates to tered on one line CALENDAR MERGE calname TYPE JOB HOLIDAY YEAR YYYY FORMAT format string The format string parameter values wer covered in section 6 2 6 4 2 Removing days from a calendar Once a calendar has been created you may selectively remov xecution dates from it with the CALI ENDAR UMM dates from an existing calendar ERG E command This command subtracts Page 17 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 The command needs to be entered on one line CALENDAR UNMERGE SUBDELETE calname TYPE JOB HOLIDAY YEAR YYYY FORMAT format string The format string parameter values were covered in section 6 2 6 5 Deleting a calendar entry Deleting a calendar is not as simple as it seems The command syntax is below and the parameteres have been explained earlier the restrictions on the command are You may not delete a holiday calendar if any job calendar references it You may not delete a job calendar if any job references it CALENDAR DELETE calname TYPE JOB HOLIDAY YEAR YYYY 6 6 Listing all calendar entries To list all active calendar entries from the calendar database use the command below It will list the key fields of
40. ler server when the runlevel is switching to single user Page 28 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 power down or reboot E y databases tha shu Wha ze hil I Cc will m t the FORCI ssues a kill to all tasks ld tasks he schedul It This command is provided The command is designed to should never be manually entered and exists th started by kill t ler switches N EDOWN option of th he schedulers immedia nsur scheduler does is jobs it spawned This wil scripts or programs the schedul itself to a shutting down state simply because in a system shutdown or reboot situation the system is unlikely to hang around waiting for long running batch jobs to complete integrety of the job scheduler it doesn t take into account any horrible effects on batch jobs may occur simply because if the system is changing runlevels for a tdown it s going to kill the jobs anyway ll not stop any ler spawned but te child so it can be processed scheduler resumes normal shutdown operations which are catch the completion of the child processes process the completion of the child processes these will all be placed into an alert event state of signal killed shutdown after the last child has reported it has been signal killed The happy outcome of this is tha managing were a
41. ly access to the job scheduler server From this level connected sessions if their individual jobscheduler us can logup to a higher authority levels root user is a special case that ca be granted after a successfull logo rid entry allows it Note that the n always logup to administrator level Each individual user logon record specifies the access level they are to n The access levels ar te users cannot see job activity guest browse read only security can only add dele jobauth can only define o access to running operator can manage jobs o jobs from the job admin can do anything An individual user can also be gran not a user with an access level of r delete job entries in job file No jobs n the active scheduler and submit database cannot define new jobs ted user management rights even if security The root user running the jobsched cmd program can always logon to the administrator level without a password THIS WILL ALWAYS BE ALLOWED as the root user needs to be able to issue commands from the init d scripts at shutdown and startup time so applying a password to root root would be detrimental in that the root password would have to be hard coded in the scripts Page 5 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 Page 6 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark D
42. n with Administrator privilage can use this command 4 There will invariable be times when you need to shutdown the server and let me say now the kill command is not the best way There are two ways to shutdown the server the bad way is covered in the next section 4 J he prefered way for the server to be shutdown is to use the command SCHED SHUTDOWN which brings the server down cleanly as follows no more jobs are permitted to start running for worried operations staff the SCHED STATUS command will show the server is shutting down all currently running jobs are allowed to complete so joblogs and scheduler databases are all in sync when the last running job completed the server will shutdown cleanly Considerations This is the preferred method for shutting down the server however it must be noted that as it waits for all jobs to complete running this could take a very long time depending on how long your batch jobs run It should still be the only way you normally shutdown the server There is a faster way but that should be reserved for system reboots see below section 10 6 Shutting down the server with a FORCEDOWN Only a user logged on with Administrator privilage can use this command DON T This function is reserved for use within system shutdown scripts This command is used by the supplied etc rc d init d script to shutdown the job schedu
43. name where is a full dependencyname value either a jobname or flename This command will show all jobs that are waiting for the dependency to be satisfied Example command DEP LISTWAIT home mark scheduler testing trigger TEST FILE DEP 8 3 Clearing all dependencies for a specific job Occasionally for whatever reason you may not wish a job to wait until all its dependencies have been satisfied before starting running This may be a DANGEROUS decision as I m sure the dependencies were setup for a reason If however you are absolutely sure this will have no nasty impacts on your days batch processing m he command DEP CLEARALL JOB jobname Page 22 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 where jobname is the jobname of a job waiting on dependencies will mark as satisfied FOR THAT JOB ONLY all the dependencies it is waiting on The job will then be requeued on time wait rather than dependency wait waiting for its scheduled time to run 8 4 Forcing a dependency name to be globally satisfied There will always however infrequently be the occasion where a job fails that just cannot be fixed in time or pherhaps a file transmission that is just not going to arrive that day In the later instance of course you would delete jobs relying on the file rather than just removing the dependecy I hope
44. ndencies if this is required A job on the alert queue cannot be RUNNOW If you wish to restart a failed job use the ALERT RESTART command A held job cannot be RUNNOW turn hold off for that to run An executing job cannot be RUNNOW as its already running A completed deleted job cannot be RUNNOW It has done its dash for the day A REPEATING JOB if issued a runnow will run immediately BUT WILL ALSO RESCHEDULE itself back onto the time it was next due to run also It will not skip a cycle as repeating jobs schedule back onto the next nn interval expected in the future reguardless of how many times they have been manually forced to run within that interval Note If EXECJOBS is set to off then the job will be rescheduled to the current time assuming it s not prevented from doing so by any of the considerations above however no jobs will run while EXECJOBS is off so it will remain on the ready queue See section 10 3 and 10 4 on the EXECJOBS flag useage 9 3 Placing a job into a hold state r There may be a reason you do not want a job to run at the scheduled tim One of the developers may have found a bug and want you to hold off for a few hours while they move in a new program for example The command SCHED HOLD ON jobname where jobname is the name of a job on the active queue will set the
45. ny shell script using this will any normal parameter ie parm DATE to 5 1 3 Examples Examples note formatting here commands need to be entered on one line sh script uses 1 x test against and will receive a YYYYMMDD numeric value just broken for nd every monday and friday at 17 00 as 20020408 CMD bin df PARM k ll script opt fred with no parameters every 15 t testfile has been ry E t fredagain TIME 20020408 09 00 opt testfile 1 A job to run the df k comma userid fred JOB ADD TEST DF OWNER fred TIME DAYS MON FRI DESC test day selection 2 A job to run a shel minutes JOB ADD TEST REPEAT OWNER fred CMD opt fred TIME 20020408 09 00 DESC test repeating job 3 A job to run after TEST JOB1 completes and file op received onto the system Will run command opt fredagain JOB ADD TEST WAIT OWNER fred CMD op DESC test waits DEP JOB TEST JOB1 FILE note command needs to be entered o n one line 5 1 4 Reserved and Special Job Names SCHEDULER NEWDAY This is a reserved jobname managed by th scheduler itself will be rejected NULL Jobs beginning with NULL are i I created this special prefix run a job to archive scheduler Any job beginning with NULL ru characteristics is the only job running i currently running once it permitted to start until i
46. ommand Quick Reference MAN ry READ TH appropriate sec ADD job CMD name OWNER unixcomman DEP JOB FI UAL FIRS aK TIME d PAR T n briefly lists the syntax for each of the commands should not be taken lightly tion of this manual for the impacts and considerations of Lly using it parmsforcommand Any command refer to total of fiv REPEATEVERY DAYS MON TU DELETE jobname Tj INFO jobname LISTALL mask w w w w I SUBMIT jobname ERI l ACK jobname ERI ER ERI FORCEOK jobname l INFO jobname rT LISTALL ERI m p RESTART jobname DD calname TYPE ERGE cal N ry n ry Boae UN D READ THE F MAN F READ THE MAN EAD T r HE OR name TYPE E UNMERG UBDELET h 1 1 JOB HOLIDAY YE calname TYPE dependencies UA UA Guns D LETE calname TYP ISTALL NFO calname TYPE H ry E NORMAL HOLIDAY Y1 JOB HOLIDAY YEAR YYYY format string ma FORMAT MONT FORMAT DAYS FORMAT DAYN U Q ER O oO GD O O O O O Or w wW w w uw wu uw w w w
47. ou issue this display command your administrator has enabled debugging options That is mentioned in 14 6 The displayed status for each job will be one of SCHEDULED FOR waiting for its time to run DEPENDENCY WAIT time to run has passed but waiting on dependencies FAILED SEE ALERTS job has failed PENDING REQUE WAIT job or scheduler conditions prevented execution execution at the ideal time requed to 5 minutes later HOLD IS ON job has been held and will not be processed until released from hold EXECUTING PID nnnn job is running the pid of the job is shown If the full details display option is on then any dependencies a job is currently waiting on will also be shown in this display 9 2 Forcing a job to RUNNOW This is for impatient operators and system managers If a job is in time wait for 23 00 and its currently 19 00 and all dependency waits have been satisfied they may not want to hang around until 23 00 for it to run SCHED RUNNOW jobname where jobname is the name of the job on the active queue will alter the queued jobs next runtime to the current time It will then be scheduled on as soon as possible Considerations A job waiting on dependencies cannot be RUNNOW S the dependency Page 24 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 section on how to delete depe
48. portant Scheduler configuration commands 11 1 Adding a new license key Only a user logged on with Administrator privilage can use this command Th SC e command syntax is to be entered all on one command line HED LICENSE COMPANY companyname SERVERNAME servername EXPIRES YYYYMMDD KEY hexchars This has been obsoleted the application is no longer shareware but free software However please note that if you copy all try to run the scheduler it will fail t ti ch e h v h mo 1 UA v A A It ou n the files to another server and servername is set at install h me and cannot be changed so will not run on another server or if you ange the server name Just re install to fix s there is a much easier way that takes seconds but as it s now free ere is also no longer any support provided and if you get the easy way en slightly wrong you ll need support So just re install if you change server name or copy the files to another server y attempt to change the licence will fail should allow company and servername to be changed but there is an tstanding bug to fix there 11 2 Changing the scheduler job catchup option Only a user logged on with Administrator privilage can use this command The scheduler catchup flag is used to determine how the scheduler manages pr fo Ba t have been deleted from processing
49. provided with the job scheduler that invoke the logger program to write them to the syslog task go to var log messages These will be in the directory you installed the job scheduler application to under the alert _tools directory You should customise these to use the alert management tool your site already uses If you chose to use my centralised alert collection tool scripts are provided with that specifically for interfacing with the job scheduler To use external scripts to forward alerts you need to define a script to b xecuted when an alert is raised and a script to b xecuted when an alert is cancelled then turn them on The commands are as below SCHED ALERT FORWARDING EXECRAISECMD full program path SCHED ALERT FORWARDING EXECCANCELCMD full program path SCHED ALERT FORWARDING ACTION EXTERNALCMD Page 33 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 13 Miscellaneous Commands 13 1 OPEN new server command The OPEN command may be used to disconnect from the current server connection and connect to another job scheduler server While the jobsched_ cmd program itself can be used to connect to remote servers this command is provided to allow connection to remote servers wW w ithout having to exit the program and start another one just easier hen you are managing
50. rcedeechea dou cuusiuiaeiarn tian Ms 13 5 4 Displaying a defined jobs etal ls orsiesccsscug ac esduces otede dea uecounatanediegeedainslae Sendedeadadbunteancevagseh caulelves 13 5 5 Submitting a job manually and why it may be bad eee eececceseeeeeeeeteeeeeeeeeeesteeeeeees 13 5 6 Automatic scheduling on of jobs how it WOrKS ecccecceeeseeeseceeeeeeseeeeeeeseeeseeeeeeeneeenneenes 14 6 Calendar PUNCH OMANLY si sesiones g eer adn ed g E a E EA ipsa band E EE ERT 15 6 1 Calendar functionality OovervieW essessseessesseesresseesresresstesresttsstesrtssrestesressresresresseesressesssee 15 6 2 The FORMAT function used to define dates ei eeceeceescereceeceseceseeeeceecesesneeeeseeerseeeeaees 15 6 3 Adding Calendar Entri Seeur naa erase aa oie Novas aaa 15 GA Changing Calendar Values meree eE aRar EAEE EEEREN EEA EARTE REEE AT xe Bos 16 6 4 1 Adding extra days into a calendar cecccsccessecesseesseceseeeseeceseeeseeceseeeseeceeseeeessanees 16 6 4 2 Removing days trom acalendar cug ccna ate ep ia a ae Amoe 16 6 5 Deleting a calendar Cnt yisi tanatos ea AES EE iE ia ETENE EEEE 17 6 6 Listing allcalendarentriesSuneanneie c a a a a o E E a 17 6 7 Displaying details of a calendar n snsensesenseessseseessesseseessessressessessressrsseesresstssersersssesssess 17 7 Managing jobs in alert status ssesseeeeeseessesseesresseesresresstesetssesseeserssesseesstsstestesesseesesstsseressseeesst 18 Fel DNS playing the alert GUUS
51. red user mu the unix level as this id d the aotoauth is set to yes gin command to logon without a ne on the server the user is n NEVER give a development also setup on production tion is global ie a dev user ine to alter production t to yes only for the development OR SECURITY ssword ITY H YES NO ADMIN C user description e you like HOWEVER if the user ess then it MUST match their d file exactly as for the the passwd file are used by in the username FROM THE run on racters ly agement only scheduler queue management only s default st be logged on at NO must provide a username password access level this user has SUBSETADAUTH is NO can t add any users YES can add users with the sam ADMIN adds full security access to the user user has root auth Page 9 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 USERLIST xxx XxXxX XXX XxXx up to 10 users a comma seperated list of unix userids that this user is permitted To create jobs for NOTE only used if a jobauth level Ignored at at admin level as admin can do whatever they wish anyway and other levels don t have access to define jobs DESC user description a freeform 50 byte description of who the user is or what the userid is being added for if a generic user 4 4 2 Deleting a user Deleting a u
52. ry 1 5 seconds in the server main code so have a massive log file for level 9 I have filled a 3GB file system in 10 minutes O ga OARNEF O ll The default log level at server installation is 0 for all modules Considerations These log levels are the levels defined at the time this document was written They are subject to change Notel level 6 has been obsoleted with the relocation of all inline server memory operation to the common memory library Selecting a setting of 6 for other modules will produce no results as they no longer perform memory operations themselves Note2 level 5 is only used by the memory library if used it will only display memory malloc free events This produces a cleaner log than using level 6 on the memory library as it suppresses the logging of proc IO and variable debug events Page 36 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 On memory A sched status mem will dump to the scheduler log file the memory allocation activity since the last newday job ran logfile current example Sat Mar Sat Mar Sat Mar Sat Mar Sat Mar 19 19 19 19 19 12s 12 s 12 12 123 21 21 21 21 21 06 06 06 06 06 2011 2011 2011 2011 2011 INFO MI001 Memory display requested INFO MIOO5 No memory slots are currently in use INFO MI003 Using 0 slots out of 20 total slots currently malloced
53. s while not essential I have decided it must remain auto login is used by the root user and must always be present The root user needs this for such things as the init d shutdown scripts YOU MAY NOT REMOVE the default users The server will refuse to delet the auto login id While the guest may be deleted there is a sanity check done each newday processing that will add it back again if it is missing If both newday users do not exist or cannot be recreated at the newday processing time the job scheduler server will become inoperable As part of the install you should have also added an entry for the unix userid that runs your web server If this user does not exist then the browser pages will not function Page 7 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 3 Syntax for running the jobsched_cmd program jobsched_cmd portnumber ipaddress note that if you wish to override the default ip address you must also provide a port number to the program The default port number is 9002 If you have changed the default port number used by the server you will need to provide the new port number here The default ip address is 127 0 0 1 localhost You can overwrite this when you need to talk to a job scheduler server on a remote system Example jobsched_cmd 9002 127 0 0 1 NOTE Use ip address for this release not a hostname
54. se from the job scheduler server databases will remove the entry from the job scheduler on the system you are currently connected to IT WILL NOT AFFECT the status of any user that is currently logged on with this userid to that system until they logout USER DELETE username username is the name of the user known by the selected job scheduler server that is to be deleted from that job schedulers databases 4 4 3 Changing a user password Sometimes users forget their passwords While I m personally in favour of deleting such users you may change the password field of a user as below USER PASSWORD username newpassword usernameis the name of the user known by the selected job scheduler newpassword is the nw password for the user 4 4 4 Displaying a user record This command will display the settings associated with a job scheduler user record USER INFO username username is the name of the user known by the selected job scheduler that is being queried Page 10 of 40 jobsched_cmd user manual Marks Job Scheduler is copyright Mark Dickinson 2001 2011 5 Job definition and management 5 0 Who can define and delete jobs Only users with JOB authority set on their scheduler user record are able to manage jobs and calendars The unix root root may also run jobsched cmd and use the AUTOLOGIN command to switch to administration access level to gain access to manage jobs and calendars
55. tive queue all jobs that are intended to run over the next 24hours The time this job runs should be set to after the batch window is expected to complete SCHED NEWDAYTIME hh mm Considerations The existing newday job will be deleted and a new one submitted If the newday time selected is after the current time the newday job will be scheduled on for the current day at the provided newday time If the newday time selected is prior to the current time the newday job will be scheduled for the time selected on the following day 11 4 Changing how the scheduler handles newday conflicts Only a user logged on with Administrator privilage can use this command The scheduler internal job SCHEDULER NEWDAY can only run after all jobs for the current batch day have completed If there are still batch jobs on the active queue running or waiting to run at the time the newday is scheduled to run the newday job will do one of two things depending o pause action flag is set 1 alert the scheduler newday job will place itself into a and wait for a manual alert restart command when opera can be restarted 2 depwait it will add one of the jobs waiting to run or executing onto its dependency list and go into a depende When released it will check again and another job to its n how n aler tions curren ncy wa deoen the newday t status decide it tly
56. y personal forum exists I am assuming you didn t download it from my website or you would already have access to my user forum I have no intention of stopping other sites from making my software available but I also have no intention of supporting anything provided to you by other sites as it s obviously out of date if you have a problem with it Page 40 of 40

Download Pdf Manuals

image

Related Search

Related Contents

Manual - warmlight  BFT Control Panel Regal 5  Q64TCTT(BW) - User`s Manual (Installation) IB(NA  議官賞」 含めた  学年 性別 - 多摩大学  USER`S MANUAL - American Weigh Scales Inc  Sea Gull Lighting 44332-825 Installation Guide  Manual del usuario del proyector EX100  

Copyright © All rights reserved.
Failed to retrieve file