Scripting Question

KScript schedule stops, reboot required

05/22/2015 1600 views

Ok Ninjas,

I need some help with a strange issue. I have a KSCript schedule to run on an hourly basis. It has to run at 5 minutes after the hour, so I am using the custom schedule of 5 * * * *. It's an Online KScript that runs a batch file to copy files down from a server. It's also set to run as a specific user (rather than System), so that it can access the server share in question.

The problem I'm running into is that after running flawlessly for 24-48 hours, it stops. All I have to do to restore functionality is restart the PC. I've tried mitigating this by rebooting the machine nightly, but since it's impossible to predict when it will stop functioning, sometimes it could be hours before the files get updates. Since these are files critical to business function, that's not really acceptable.

I've further mitigated this by setting up Notifications to email when the the files are more than 2 hours old. But that still requires someone to be on watch to manually reboot.

Anyone else experience anything like this with scheduled KScripts?

0 Comments   [ + ] Show comments


All Answers

that could be a bug, I would contact tech support on that one

you can try modifying your cron to see if this tricks it.  Hyphens define ranges

5 1-23 * * *
Answered 05/22/2015 by: SMal.tmcc
Red Belt

  • Hadn't thought about trying the modified cron schedule. I'll give it a shot. Thanks. I also plan on contacting support, just wanted to see if anyone else has seen this.
With regards to the script stopping, enable debug, gather the logs and contact support.

As for your cron schedule, SMal's suggestion would be what you are looking for.

Your cron schedule actually has the script running every 5 minutes, not 5 minutes past the hour.  Also remember that anything entered into a cron schedule is considered.  The statement uses OR, not AND, so anything in a cron schedule matches, the script is run.

 I like this calculator for being able to see this visually.  It's not a 1 to 1 comparison with the K1000, but it will help show how it works: http://www.openjs.com/scripts/jslibrary/demos/crontab.php
Answered 05/25/2015 by: jknox
Red Belt

  • Thanks for the link. It seemed to be running correctly with the 5 * * * *, it would just stop after a random number of hours. I have changed it based on SMal's suggestion, but still had a failure over the weekend on one of my test PCs. I did also activate the script on a couple of production Windows 7 PCs and haven't had any issues, so far. The first two test PCs that had the problem are Windows XP, so I'm thinking it may just be a glich in XP. Not overly concerned about that, since we're about to make a final sweep to get rid of our remaining XP devices.
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ