Kaseya Community

Executing a script from a script

  • Is it possible to execute the currently running script from the 'execute script' command?

    For example:

    execute script 1 from within script 1




    Legacy Forum Name: Executing a script from a script,
    Legacy Posted By Username: rdmtech
  • It don't believe you can call the same script directly. However, you can use the schedule script option to schedule it to run shortly.

    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: connectex
  • It sounds like you are unsure if this is possible. If anyone who knows for sure this will or won't work would offer their assistance I would appriciate it.

    So let's say that it's not possible and I need to schedule the script. It asks me to enter the time delay in minutes. Is is possible to use decimals? Can I set it to 15 seconds by entering .25?


    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: rdmtech
  • What would help tremendously with this script is if it were possible to tell if an application or process is running from the 'THEN' or 'ELSE' branches instead of just the 'IF' section.

    Is this possible?


    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: rdmtech
  • Sorry...duplicate post.


    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: rdmtech
  • Well, Kaseya's scripting is good. However, without multi-level if's you're forced to create several scripts to check for multiple conditions. I personally use VB script instead of creating several Kaseya scripts.

    I confirmed it's not possible to call a the same script within itself. It fails with a "script already loaded" message in the log.If you use the schedule script option anddon't put a delay in there it will schedule the script immediately. However, there may be some delay due to agent check-in.




    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: connectex
  • Is is possible when scheduling a script to specify seconds by using decimal values?

    .25 = 15 seconds


    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: rdmtech
  • Weather or not your specify a .25 delay, it's not going to run the script every .25 seconds repeatly due to the agent check-in process. So it's not really irrelevant how low the delay can be.

    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: connectex
  • So when I schedule a script from within a script it won't run that scheduled script until the agent checks in again?


    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: rdmtech
  • I don't know the exact details. Both it seems you must provide a delay when scheduling script toget it to run repeatly. It seems it will only run it twice if you don't specify a delay amount. Even through it's list in the pending scripts, it doesn't run again!?! I tested scheduling with.25 minutes....it works.

    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: connectex
  • Thanks. I noticed it seems to work as well.




    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: rdmtech