Scripting Schedule not running?
So maybe I'm going crazy, but I've set up a lot of scripts to run on schedules. Each of these scripts has been tested and runs perfectly fine when manually executed, but nothing on a schedule is running. I must not be understanding how scheduling works, even though I feel it should be pretty straightforward.
Some of the scripts are Online Kscripts set to run once a week. For example, Install NetworkPrinter1 every Monday at 9am (first checking to see if it's already there). I've staggered the execution times for different printers. They are also set to allow running without a logged in user. The script is Enabled. Monday at 9am comes and goes with no printer in sight.
Some of the scripts are Offline Kscripts set to run on a given schedule. For example, Install LocalIPPrinter1 on the 1st of the month, also at next checkin, also before/after login, allow script to run without a logged in user. Another example, Install LocalIPPrinter2 every 2 minutes (if printer doesn't already exist), with all the same options checked. I realized this will bog everything down by running things so frequently, but really it's just for testing purposes, until I can figure out what settings work best for us. Or just work, period.
It seems like the PCs will check in/ update inventory a few times and still no printer shows up. I don't understand the hold-up. We are running agent 6.3.314 on all our clients, and our K1000 appliance is running 6.3.113398.
Also, semi-related, is there a reason our clients don't always check in as often as they should? The desktop I'm currently sitting at, and have used to some degree every day this week, hadn't gotten an inventory update for 5 days. When I force the inventory from the server side, I noticed 10 minutes later (if not longer), it's still not updated. If I force an inventory update via command line from the client, it updates right away. In the Organization settings under System, Agent is set to run every 15 minutes. Scripting inventory every hour, but I've played around with these numbers a bit, and haven't seen any change. I've noticed many clients that aren't updating consistently.
Maybe my frustration is blinding me to something obvious, but any feedback is greatly appreciated...
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
airwolf
9 years ago
If your online KScripts run but the printer isn't installed, then it may be an issue with the configured permissions. When you say it works manually, do you mean it works when you run the commands in the KScript manually on the PC via command line? Or when you run the script via Run Now?
Some commands may not work without a user logged in. This isn't an issue with the agent, this is a limitation of certain types of commands on the operating system.
The difference between an online and an offline script is that the online script is triggered/scheduled by the K1000 server and pushed to the agent. An offline script, on the other hand, will run based on the schedule and is triggered agent-side by the agent itself. Offline scripts will run regardless of server load and even when the server is offline.
Alternatively, scheduling of online scripts is dependent heavily upon server load. When you run an inventory manually from the agent (i.e. 'runkbot 4 0' for Windows), the agent will collect and send inventory data to the server immediately. When you trigger inventory from or it is scheduled on the server, it is queued up in the konductor task list and sent out to the agent based on the priority of the task and the amount of tasks currently in the queue. If your inventory interval is 1 day and the schedule is failing for 5 days, your server likely has too many tasks queued up to meet the demand of your configuration. You may need to loosen the agent task intervals (inventory, scripting, software inventory, etc.) to reduce the amount of tasks. You can also increase task throughput on the server, but we don't recommend going above 5 without further investigation from support.
If you'd like us to look into your issues further, please feel free to contact Dell KACE support.