I've finished an initial rewrite of the ruleset format for SJQ
v2.0.0. The new ruleset provides a much more expressive syntax, but
also remains relatively simple, which is important for me as far as
maintaining the code base moving forward. Please keep in mind that
this new syntax also takes into account the client/server architecture
I'm working on for v2.0.0.
Here's an example of how the new ruleset file will look like on the
server:
if [ (IsScheduled == true || IsHD == true) && ((TimeOfDay > 00:00:00
&& TimeOfDay < 06:00:00) || (TimeOfDay > 13:00:00 && TimeOfDay <
17:00:00)) ]
{
:PRIORITY 10 # Priorty of this rule when inserted into queue
:NOTIFYONFAILURE
m...@domain.com # Possibly allow email
notification on jobs, not currently implemented
:NOTIFYONSUCCESS
m...@domain.com # Also not implemented yet, but an
idea
COMMFLAG # Tokens that don't start with ':' are names of jobs to
run, you can run more than one task per rule
ARCHIVE # Another task to run for this rule
TRANSCODE # And a third one, etc.
}
So this ruleset file will setup a queue of jobs to be run by clients,
then on each client you will configure the jobs that it can do like
this:
:MAXPROCS 3 # This client can run up to 3 jobs in parallel
COMMFLAG # Exe block for COMMFLAG jobs (must match tag from server
ruleset)
{
:MAXPROCS 2 # Client can run three jobs in parallel, but only max
of 2 comm flag jobs
:CPU low # Not implemented, but was idea from Sage forum, haven't
investigated this yet
"C:\Program Files\path\to\showanalyzer.exe" %f% # Lines that don't
start with ':' are exe lines for target
"C:\some\other\program.exe" %f% # Run more than one exe if you
like, but only if the prev ones succeed
}
ARCHIVE
{
# Samething as above, but for archive jobs
}
TRANSCODE
{
# Again, same as above
}
All of this file editing will be available on the web. Simply install
a client and start it with the IP address of the server then the
client will show up on the web for configuration. The server config
parser is written (but can still be modified based on feedback), I
haven't started on the client parser yet (though the example file I
have here is what the current plans are). In v2.0.0 users will have
to write the rules file "by hand" using the syntax outlined above
(pending any changes from your feedback). I found the web editor in
v1.x cumbersome and not as clear for users as I had hoped. With the
new 'and' and 'or' operators along with parenthesized precedence
operators there really is no easy way to make a good visual editor
that provides all the power of just writing your rules out in the
given syntax (but if you disagree I'd love to hear your ideas).
If you use SJQ I am really looking for some feedback on this. To me
it seems like a good mix of a more expressive/powerful syntax while
still remaining easy to use, but then again, I wrote it so I'm really
looking for feedback from other users.