Schedule Compiling batch script
Moderators: chulett, rschirm, roy
Schedule Compiling batch script
Hi All
I have a requirement of , create a script which will scan through all the set of jobs and then compiles if there are any jobs with "Not Compiled" State . Can anybody help me in this .
I would really appreciate your time and help on this.
I have a requirement of , create a script which will scan through all the set of jobs and then compiles if there are any jobs with "Not Compiled" State . Can anybody help me in this .
I would really appreciate your time and help on this.
Regards
Lotus26
Lotus26
Seems like a strange requirement, why would you need to do such a thing?
Not sure how simple this would be, regardless. Normally I'd say do this with "dsjob": first with "-ljobs" to get their names and then iterate thru the names using "-jobinfo" to see what state each one is in. Problem is, jobs in a "Not Compiled" state cannot be found by the "-jobinfo" option, you get an error instead. Hmmm... unless you assume that the:
ERROR: Failed to open job
Status code = -1004
messages it logs in that case can be assumed to mean a job in that status. After that, use dscc.exe to compile them.
All from the client side.
![Confused :?](./images/smilies/icon_confused.gif)
Not sure how simple this would be, regardless. Normally I'd say do this with "dsjob": first with "-ljobs" to get their names and then iterate thru the names using "-jobinfo" to see what state each one is in. Problem is, jobs in a "Not Compiled" state cannot be found by the "-jobinfo" option, you get an error instead. Hmmm... unless you assume that the:
ERROR: Failed to open job
Status code = -1004
messages it logs in that case can be assumed to mean a job in that status. After that, use dscc.exe to compile them.
All from the client side.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Thank you for all your responses .
we got this requirement because in our environment , by mistake some of the other people migrating the jobs but forgetting to compile and because of which we are getting problems .
To avoid that situation , we want to create a script which will scan through all the jobs and want to compile the jobs which are not in the compiled or runnable state.
we got this requirement because in our environment , by mistake some of the other people migrating the jobs but forgetting to compile and because of which we are getting problems .
To avoid that situation , we want to create a script which will scan through all the jobs and want to compile the jobs which are not in the compiled or runnable state.
Regards
Lotus26
Lotus26