Kaseya Community

Is it practical / realistic to run a script every 5 minutes on a server?

This question is answered

Hi folks,

simple query


I have a script I want to run on a server, it just does a sqlplus query on oracle so a basic enough script.

I am just wondering if it realistic to run this script at 5 minute intervals. Normally I would build an exe using auto it and then just run the exe and have it check every 5 minutes but ten you have create a monitor set to monitor the exe and so on.

i am worried that 5 minutes is just too short and with script delays and lag with SQL etc this could drag out to 10 minutes here or 20 minutes there.

I am checking the freespace of tablesspaces in oracle so its important it is running.

thoughts welcome.

Verified Answer
  • I would advise against it as i have often found that Kasyea can have delays running scripts on a scheduled basis like that. If your script is time critical then use a scheduled task.

All Replies
  • A scheduled task seems more appropriate. You could even build in error control and custom events.

    What advantages are you seeing in using a Kaseya script like this?

  • the advantages simply are its a one stop shop - create procedure and schedule. Dropping down to scheduled task means create script to create scheduled task then I have build in some monitoring to ensure scheduled task is there and running.

    As I said this is not normally what I would do I would normally dump something on the server and do similar to what you describe i just wanted to get thoughts on approaching it from this angle instead.

  • I would advise against it as i have often found that Kasyea can have delays running scripts on a scheduled basis like that. If your script is time critical then use a scheduled task.

  • to be honest this was my thinking too I just wanted to see what others thought.


  • Ditto, if you need rely on this script to run every 5min then doing it via Kaseya scripting is not the answer, now if you wanted to deploy the script to be executed via Windows Scheduler then that is a different story. Kaseya scripting schedules is more of a "best effort" so its not the best tool for this task.  

    Also mmartin I'm pretty sure that most SQL products have an Manager app that can perform these task for your, Microsoft SQL uses it for maintenance tasks (Microsoft SQL Studio).

  • There's no fundamental issue with frequent scripts unless they are quite intensive, and Kaseya will normally keep pretty close to time unless there are a variety of scripts running that can get in the way (best effort, as above, is a good way to describe it).

    For what it's worth I run 5 and 10 minute interval scripts on a Citrix Xen host to monitor it's performance and VM states, the time drift is no worse than 10-30 seconds typically, so if that sort of 'inaccuracy' is a problem it's not the best idea. For what I use it for it works perfectly (though watch the script log grow!)

  • I agree with HardKnox, I'm sure that Oracle has a tool that will do that, and most tools parse to a log file or an event which you could use as a monitoring point, Keeping in mind that monitor sets and event logs don't run non-stop but at intervals so it's very similar to what you're trying to accomplish without having to use MS scheduler (which I find flaky but the guy next to me swears by it).

  • Josh - I'd be very interested in seeing some of those scripts? I'm having difficulty finding what's possible in Agent Procedures on linux agents. We're just rolling out agents to a load of Xen hosts.

  • Don't you use cron to schedule tasks in XEN?

  • I don't see a problem doing this myself unless you're doing it on a huge number of machines and have resource usage concerns at the Kaseya server.

    The only cases where it may not run are when an audit is running... there isn't a lot that should cause it to delay very long.