CRON style snapins
-
Asking because I don’t know, but what sort of behavior do CRON style repeating snapins have?
I am thinking about scheduling a batch file to cause a shutdown at 10:00 PM each day, and I’m wondering what happens when that event is missed. Is the task stuck in task management? Or is it cleared or what?
-
Isn’t this functionality also available in the GreenFog settings?
I’ve looked at them but never tried playing with them. -
I’ve never played with green fog. I suppose it’s time.
-
@Wayne-Workman I just tried setting up a cron style snapin which is not able to run (because I have the machine off the network). Those snapin tasks build up in “Active Tasks” as the client does not checkin for that task. Not sure if we should handle this differently. Should cron style tasks kill/delete unfinished old tasks?
-
@Sebastian-Roth I’ve always thought that all tasks should be stackable, except for wiping and imaging.
If you do an image deploy or wipe, clearly any other snapins no longer matter. But besides that, I think snapins should stack up.
-
@Wayne-Workman But in your case the shutdown snapins would stack up forever if the machine is off already (and possibly shut it down straight after it is booted up???)
-
@Sebastian-Roth In that case, those snapins should only run that one time, like they do now. If the moment is missed, then it’s just missed.
-
@Wayne-Workman But how are we going to tell when and if it is missed? The client needs to checkin for the server to see. But how long do we wait? 10 minutes, 30 minutes, 6 hours?? I am not sure if there is a general rule we can apply. Maybe this needs to be a configuration option for every single snapin (like SNAPIN_TIMEOUT, where 0 = never and X = X minutes). @Tom-Elliott you know the code a lot better than I do. Would that be a huge change?
-
@Sebastian-Roth said:
The client needs to checkin for the server to see. But how long do we wait?
FOG_SERVICE_CHECKIN_TIME
Whatever that is set to, plus a minute.
-
@Sebastian-Roth @Wayne-Workman I think an adjustable time would be nice though. Hard coding in a time might not be best for everyone, I am not a seasoned programmer but coding a field in the DB along the same lines as the FOG_SERVICE_CHECKIN_TIME to give the time a value doesn’t seem like it should be much harder. FOG_CRON_TASK_EXPIRY. Having it a global value, and not per task I think would be fine.
That way it could be set in a fashion of every night run this task, if task hasn’t been run in X min delete task. This would allow a task to run at anytime through the night, but expire before morning when the computer would be used.