Byrial Jensen wrote:
River Tarnell skrev:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
it's now possible to schedule jobs that run SQL queries, as well as those that use CPU resources. this is described on the wiki at
https://wiki.toolserver.org/view/Batch_job_scheduling#Scheduling_SQL_queries
Is there any way to schedule jobs when you don't know in advance which SQL cluster they use. I normally just give the database name to my programs on the commandline and leave it to the program to look up which cluster to use.
How can I such schedule jobs?
I'd also be interested in that. All my tools use the DNS aliases for connecting to the database servers, a method which I've found to be both convenient and reliable. Would the batch job scheduling system perhaps allow for similar aliases to be defined there as well, or something?
(Also, the one tool for which I might currently use this facility actually only uses the Commons database, which is replicated to all the servers. So, technically, it could use whichever database server happened to be least loaded at the moment, if such information could be provided to it. I'd be glad for any suggestions on how to do that.)
Another matter is that I use binaries which are compiled to a specific architecture. Would it be possible in a script to test which architecture it is run on, and then select the binary to run accordingly? Any code exeamples would be great.
In a shell script, you can check the output of the uname command. In Perl, the $^O variable can be used for the same purpose. I suppose you could also just try running both binaries and see which one works...