[GH-ISSUE #993] Feature Request: Tasks depend on Tasks or Tasks depend on Checks or Checks depend on Tasks #2547

Closed
opened 2026-03-14 04:29:27 +03:00 by kerem · 6 comments
Owner

Originally created by @JSuenram on GitHub (Feb 26, 2022).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/993

For Example.... you Check if Firewall is enabled.... and if not fire a task that enabled Firewall.... Sure you can do all this in the Check, but not every example is like this.... Or Trigger Tasks on Checks and so on..... more flexibility what will be done if something else returns True or False without the need to put everything possible in a script....

I guess it will be more userfriendly....

Originally created by @JSuenram on GitHub (Feb 26, 2022). Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/993 For Example.... you Check if Firewall is enabled.... and if not fire a task that enabled Firewall.... Sure you can do all this in the Check, but not every example is like this.... Or Trigger Tasks on Checks and so on..... more flexibility what will be done if something else returns True or False without the need to put everything possible in a script.... I guess it will be more userfriendly....
kerem 2026-03-14 04:29:27 +03:00
Author
Owner

@silversword411 commented on GitHub (Feb 26, 2022):

So if I understand this, you want as part of the script and task setup process if return of x do y.

Can this be done with script snippets now as part of your script?

<!-- gh-comment-id:1052283424 --> @silversword411 commented on GitHub (Feb 26, 2022): So if I understand this, you want as part of the script and task setup process if return of x do y. Can this be done with script snippets now as part of your script?
Author
Owner

@JSuenram commented on GitHub (Feb 26, 2022):

Yes something like that.
So for example you run a check task and if result is true then run task xy....

<!-- gh-comment-id:1052305482 --> @JSuenram commented on GitHub (Feb 26, 2022): Yes something like that. So for example you run a check task and if result is true then run task xy....
Author
Owner

@bc24fl commented on GitHub (Feb 27, 2022):

Being able to run a script depending on the output of another is super powerful. I've been thinking of this problem for some time now. The only way to currently do this is by saving your output to Custom Fields and then using the API to run the next script but that can get sloppy pretty quick although doable.

<!-- gh-comment-id:1053643542 --> @bc24fl commented on GitHub (Feb 27, 2022): Being able to run a script depending on the output of another is super powerful. I've been thinking of this problem for some time now. The only way to currently do this is by saving your output to Custom Fields and then using the API to run the next script but that can get sloppy pretty quick although doable.
Author
Owner

@r3die commented on GitHub (Feb 28, 2022):

This is something you may be able to with checks and setting exit codes in your scripts.
For instance, I have a PS script as a check, when it finds something it ends with a certain exit code that TRMM check sees as a 'failure', then I have a dependent task that runs upon failure

<!-- gh-comment-id:1054814190 --> @r3die commented on GitHub (Feb 28, 2022): This is something you may be able to with checks and setting exit codes in your scripts. For instance, I have a PS script as a check, when it finds something it ends with a certain exit code that TRMM check sees as a 'failure', then I have a dependent task that runs upon failure
Author
Owner

@silversword411 commented on GitHub (Mar 1, 2022):

@JSuenram So there is already support for running a task (on check error) when a check fails (have check be a script with a return code).

Will that do everything you're trying to do, or do we need to keep this issue open?

<!-- gh-comment-id:1055016989 --> @silversword411 commented on GitHub (Mar 1, 2022): @JSuenram So there is already support for running a task (on check error) when a check fails (have check be a script with a return code). Will that do everything you're trying to do, or do we need to keep this issue open?
Author
Owner

@silversword411 commented on GitHub (Mar 16, 2022):

Closing, will reopen if hear back

<!-- gh-comment-id:1069628352 --> @silversword411 commented on GitHub (Mar 16, 2022): Closing, will reopen if hear back
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tacticalrmm#2547
No description provided.