News:

Follow BoincTasks on Twitter Facebook        Visit our website here.
BoincTasks cloud login is working again

Main Menu

Rules

Started by fred, July 18, 2010, 04:32:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fred

Some examples

If project X with application Y is active for more than 3 hours an event is triggered.
If project X with application Y generates 10 errors within 10 minutes an event is triggered.
If any task has a progress of less than 0.01% within 10 minutes an event is triggered.
If project X with application Y runs below 56C for xx time it will trigger an event.
If 10 errors appear within xx time an event is triggered.
If computer X lost the connection for xx time an event is triggered. If the computer is reconnected within the xx time the rules isn't triggered.
If project Y on computer X has more work than 1 day set "No more work".
If project Y on computer X has less work than 12 hours set "Allow new work".



It is possible to add a rule from the Tasks view. Click on the task you want add a rule for and press the right mouse key.
Select Add rule
This fills in all the names relevant for this task.

Rule name: Must be unique name that describes the rule.
Computer: Optional name of the computer, leave this empty if the rule applies to all computers.
Project: Optional name of the project, leave this empty if the rule applies to all projects.
Application: Optional name of the application, leave this empty if the rule applies to all applications. As of V 1.28, wildcard may be used like t?s? = test, test* = test1whatever, test* = test2

* the above fields may hold a part of the name: Like 3.02, instead of the whole name.

Type:

Elapsed Time The time the task has been running since the first start.
Cpu% The percentage between wall clock the actual run time of the CPU.
Progress % The progress percentage of the task.
Time left The time the task has left.
Progress / min % As the Progress % but now the progress that has been made in one minute.
Use The number of CPU and GPU % that are planned for this task. E.g. 0.04 Cpu + 1 GPU or 0.025Cpu.
Temperature The CPU or GPU temperature. This rules must have a valid computer name.
Wallclock In a time interval. This rules must have a valid computer name.
Deadline Deadline =  (Deadline time - System time) - Time Left. So a deadline that is 1 day from now and time left of 2d gives -1d, that means it will go 1 day beyond the deadline. < -14d,00:00:00 triggers if 14 days or more past the deadline. < 4d,00:00:00, triggers if 4 days or less, before the deadline.
Time Left Project Cpu and Gpu time left on a specific project.

The 3 rules have to be ALL valid, at the same time for the event to trigger.
You may leave unused rules empty.

Time:

The time the rule has to be valid to produce an event. Blank means 0 seconds.
Don't use a short time, as this may result in a lot of false positives.

Event:

A rule may have one internal an one external event at the same time.
E.g. Suspend a task and start an external program.

A rule may have 0 events, so it only shows a color.

Run program Runs an external program or batch file.
The field below must hold the full name of the program. E.g. beep.bat
The folder is the default BoincTasks folder: C:\Users\user name\AppData\Roaming\eFMer\BoincTasks\

So beep.bat is the same as C:\Users\user name\AppData\Roaming\eFMer\BoincTasks\beep.bat

An ENTER (key) may be used to keep the text in the box.

You may add parameters: E.g. beep.bat, parameter
The "," is used to separate the program name from the parameter.

Suspend project

Suspends the project of the task that triggered the rule.

Suspend task

Suspends the task. When more tasks are triggered at the same time, only one is suspended. The other tasks are suspended, one every following second.

No more work

Sets the project to "No more work". E.g. Deadline < 2d,00:00:00 No more work.

Allow new work

Sets the project to "Allow new work". E.g. Deadline > 2d,00:00:00 Allow new work.

Snooze

Snoozes the entire computer for a time set in the right corner window, like 30:00. (30 minutes).
To allow the computer to run again, set a time of 00:00 (0 second), this will remove the snooze condition.

"show logging" check

When checked, BoincTasks will show the rules logging window, when an event is triggered.

Resetting a rule:

Rules are reset when you:

Edit any rule.
A tasks is no longer running.


Some inside information:

The rules are checked, using the history information.
This means, the rules are checked, at the history interval time.
CPU % and Progress / min are measured, over a period of 2 History cycles.

Progress / min:

Cycle 2: Progress 61   1 Progress / min
Cycle 4: Progress 64   3 Progress / min
Cycle 6: Progress 66   2 Progress / min
Cycle 8: Progress 66   0 Progress / min
Cycle 10: Progress 66   0 Progress / min

Rules can be used on a specific computer, or on all computers, unless stated otherwise.
Leaving a rule field empty, is the same as a all.
So a blank computer = all computers, a blank project = all projects, a blank program = all programs.

The rules below are specials.

Status rules:

Status rules can trigger on a number of tasks in a specific status.

The syntax for the value is: status, count 3,4
A rule can only have status types, all others types will be ignored.
A status rule must have a valid computer and project name. An Application name will be ignored.

Examples:

A rule Status > 3,4 Time 10:00 is active when there are 4 tasks in the error status in the last 10 minutes.
A rule Status = 5,0 Time 60:00 is active when there where no completed tasks the last 60 minutes.


Status codes:

3 Computation error
4 Uploading
5 Ready
6 Aborted


Wall clock rules:

As of V 1.52.


Wallclock time rules can:
Suspend and resume work fetching.
Suspend and resume specific projects.
Snooze and resume CPU and or GPU on a computer.

Select "Wallclock" in the Type column.

Click on the schedule and modify it.

The shift key lets you select a range.
Together with the Ctrl key a range can be deselected.

Connection rules:

You can setup a rule, that goes active, when a connection is lost or never made, after xx seconds.
The Project, Application and Value fields aren't uses.
A blank computer name means all computers.
=<> A lost connection
<> No connection

Connection =<> 00:05:00 (Type, Operator, Time) When a connection is lost for more than 5 minutes the rule triggers.

The only Event that can be used is "Run program" or "Show" logging.

Time left on a project rules:

Make sure you set a valid computer and a project, the application name isn't used.

E.g.
Time Left Project > 1d,00:00:00 will trigger if the project has more than 1 day work. Typically "No more work" is used as Event.
Time Left Project < 0d,12:00:00 will trigger if the project has less than 12 hours work. Typically "Allow new work" is used as Event.

Warning use a time of 2:00 on the  "Allow new work" rule, to make sure it isn't triggered at start up, when the time left is 0, for a short while.

--------------------------------------------------------------------------------------------------------

The rules are stored in C:\Users\username\AppData\Roaming\eFMer\BoincTasks
File: rules.xml

itime = trigger time in seconds
ivalue0 if time than in seconds

jjwhalen

NOTE:  Remember that if you suspend one project while work download is enabled on all others, the BOINC client will tend to download too much work - especially with a high work buffer (Days Work) setting.  The client doesn't know when the suspended tasks will be available again, and "works around" them to keep the work buffer up.  Thus you may want to set all projects on the computer to "No new tasks" while a Wallclock Rule suspension is active.


wertperch

Darn! I was hoping to use the rules to abort one particular kind of application, on a project that does not allow me to choose which to download.

And presumably I have to create a separate rule for each computer? No wildcards?

It sounds like all I do is complain, but honestly, this is a minor niggle in an otherwise great app!

Quote from: fred on July 18, 2010, 04:32:03 PM
Status rules:

A rule must have a valid computer and project name. An Application name will be ignored.


fred

Quote from: wertperch on December 26, 2010, 06:32:52 AM
Darn! I was hoping to use the rules to abort one particular kind of application, on a project that does not allow me to choose which to download.

And presumably I have to create a separate rule for each computer? No wildcards?

It sounds like all I do is complain, but honestly, this is a minor niggle in an otherwise great app!
I just tried it, when you leave out the computer name (blank), the rule applies to all computers.
You can check the rule log for all triggered rules.

Maybe I should change blank into *.

wertperch

Thanks! That just leaves me to figure out how to make a rule apply to just one application, rather than just a whole project!

Quote from: fred on December 26, 2010, 10:25:01 AM
Quote from: wertperch on December 26, 2010, 06:32:52 AM
Darn! I was hoping to use the rules to abort one particular kind of application, on a project that does not allow me to choose which to download.

And presumably I have to create a separate rule for each computer? No wildcards?

It sounds like all I do is complain, but honestly, this is a minor niggle in an otherwise great app!
I just tried it, when you leave out the computer name (blank), the rule applies to all computers.
You can check the rule log for all triggered rules.

Maybe I should change blank into *.

fred

Quote from: wertperch on December 26, 2010, 10:32:04 AM
Thanks! That just leaves me to figure out how to make a rule apply to just one application, rather than just a whole project!
Best select a tasks with the right application in the Tasks view. Select with the right mouse key and choose Add rule from the context menu.
Next remove the computer name & Project name.


Art_Brown

If you want to define rules based on the name of an executable program, such as a specific BOINC task, Process Lasso from Bitsum Technologies lets you do that, including defining disallowed processes. I use Process Lasso to assign CPU affinities and priorities to my BOINC tasks, but you might try disallowing the processes (tasks) that you don't want to run. Process Lasso won't stop the BOINC task from being downloaded, but it will stop a task if it matches the rule you create. Rules can include the * wild card, so one rule can be set up that applies to a range of process names. Process Lasso is free for home and educational users at http://www.bitsum.com/

paul

Quote from: wertperch on December 26, 2010, 06:32:52 AM
Darn! I was hoping to use the rules to abort one particular kind of application, on a project that does not allow me to choose which to download.

Similar to what I would like to see with Boinctasks. The ability to abort a certain task using a wildcard word in the task name. All the various types of tasks with GPUgrid use the same application, but some types of tasks are problematic with certain cards. Process Lasso is no use with Linux. :(
Thanks for reading  ;D

fred

Quote from: stoneageman on November 14, 2011, 07:21:11 PM
Similar to what I would like to see with Boinctasks. The ability to abort a certain task using a wildcard word in the task name. All the various types of tasks with GPUgrid use the same application, but some types of tasks are problematic with certain cards. Process Lasso is no use with Linux. :(
Will do.

paul

Thanks Fred. Another donation in the pipeline  ;)

Corsair

How to cancel (abort) a task based in rules ??

I want to cancel all task based in one project using only one CPU, is not difficult, but I only could see in the options of tasks the actions:

  • run program
  • resume project
  • no work
  • suspend project
  • suspend task

for the moment I'm using the suspend task option, at least I don't spend time in the option I don't want but I prefer to abort such task instead.
Roses don't bloom on the sailor's grave

Corsair.

fred

Quote from: Corsair on January 07, 2012, 07:31:54 PM
How to cancel (abort) a task based in rules ??
You can't, for now I find it to dangerous to add it.

thebestjaspreet

Quote from: Art_Brown on November 10, 2011, 08:07:14 PM
If you want to define rules based on the name of an executable program, such as a specific BOINC task, Process Lasso from Bitsum Technologies lets you do that, including defining disallowed processes. I use Process Lasso to assign CPU affinities and priorities to my BOINC tasks, but you might try disallowing the processes (tasks) that you don't want to run. Process Lasso won't stop the BOINC task from being downloaded, but it will stop a task if it matches the rule you create. Rules can include the * wild card, so one rule can be set up that applies to a range of process names. Process Lasso is free for home and educational users at http://www.bitsum.com/

I will like to clarify that Process Lasso is not free as many of its fatures get disabled after some time. This is very clear on their product page.
http://bitsum.com/prolasso_purchase.php
Also I will like to submitt that the wall clock rule is not working for task but is working for Project i.e.Resume or suspend project but not task.
"I always win law permanently"

thebestjaspreet

#13
Quote from: fred on July 18, 2010, 04:32:03 PM
Some examples

Examples:

A rule Status > 3,4 Time 10:00 is active when there are 4 tasks in the error status in the last 10 minutes.
A rule Status = 5,0 Time 60:00 is active when there where no completed tasks the last 60 minutes.


Status codes:

3 Computation error
4 Uploading
5 Ready
6 Aborted

"I always win law permanently"

fred

Quote from: thebestjaspreet on January 28, 2012, 04:58:21 PM
Quote from: fred on July 18, 2010, 04:32:03 PM
Some examples

Examples:

A rule Status > 3,4 Time 10:00 is active when there are 4 tasks in the error status in the last 10 minutes.
A rule Status = 5,0 Time 60:00 is active when there where no completed tasks the last 60 minutes.


Status codes:

3 Computation error
4 Uploading
5 Ready
6 Aborted


Status code 5 is for ready to start or ready to report  ?
Ready to start isn't in the history.
Ready to report.