• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Scheduled task cancellaton

Scheduled Pinned Locked Moved
Feature Request
4
5
1.6k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N
    Nik777
    last edited by Jul 24, 2014, 7:26 PM

    Hi All,

    Many years ago I wrote a feature for FOG 0.28 which allowed a scheduled task to cancel other tasks.
    I am now evaluating FOG 1.2, and would like to know if and how I can get the change incorporated into the mainline FOG code (or as some kind of plugin).

    The problem the feature solves is that if I scheduled a virus scan at 1am, but some machines fail to wake-up-on-LAN, then when the users boot the machine later in the morning, the machine proceeds with the virus scan then, with no way of avoiding it, save going into FOG and cancelling the task.

    So I wrote a cancellation task, which I schedule for 3am. Then, any Virus scan task that has not run by 3am is automatically cancelled, so the users could use the machine when they come in.

    While I only implemented the UI to support a canccellation task for the virus scan, the cancellation task can be applied to any other type of scheduled task.

    Any and all comments are welcome.

    Cheers!
    Nik

    1 Reply Last reply Reply Quote 0
    • W
      Wolfbane8653 Developer
      last edited by Jul 31, 2014, 4:38 PM

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • W
        Wolfbane8653 Developer
        last edited by Jul 31, 2014, 4:41 PM

        [ATTACH=full]1245[/ATTACH]

        Maybe something like?

        Or at least a cut off time. If task does not start after [B]X[/B] number of hours/min, then cancel task.

        [url=“/_imported_xf_attachments/1/1245_Untitled.png?:”]Untitled.png[/url]

        1 Reply Last reply Reply Quote 0
        • D
          dan9385
          last edited by Sep 19, 2014, 8:32 AM

          I think this feature would be a useful addition. We have a similar scenario that is a bit of a pain for us.

          All of our IT suite PCs are set to re-image on a schedule outside of normal working hours. If for any reason a schedule fails to start, (whether that be because WOL doesn’t work, or someone physically switches off the PC at the wall), the task stays in the active task queue and runs the next time the PC is powered on.

          The next time the PC is powered on, it’s normally because someone wants to use it, only to find that it’s re-imaging which will take 20-30 minutes rendering the PC unusable during that time.

          The ability to add a threshold when scheduling a task would be useful. For example, if the task doesn’t start within say 15 minutes of it’s scheduled time, it’s automatically removed from the active task queue. That way if the re-imaging task fails to start for any reason, the PC will still be usable the next time it’s powered on.

          Currently we have to monitor the task list and manually cancel any tasks that have not run that may cause a problem.

          Thanks

          1 Reply Last reply Reply Quote 0
          • T
            Tom Elliott
            last edited by Sep 28, 2014, 2:26 PM

            [quote=“Nik777, post: 34029, member: 649”]Hi All,

            Many years ago I wrote a feature for FOG 0.28 which allowed a scheduled task to cancel other tasks.
            I am now evaluating FOG 1.2, and would like to know if and how I can get the change incorporated into the mainline FOG code (or as some kind of plugin).[/quote]

            Interesting that you already have written such a thing. I don’t know how useful, in today’s FOG, it really would be, but that’s not to say it couldn’t be included. I don’t know what the code looked like though so I don’t know where to begin in helping you out with
            this.
            [quote=“Nik777, post: 34029, member: 649”]
            The problem the feature solves is that if I scheduled a virus scan at 1am, but some machines fail to wake-up-on-LAN, then when the users boot the machine later in the morning, the machine proceeds with the virus scan then, with no way of avoiding it, save going into FOG and cancelling the task.[/quote]

            While the feature solves this problem, one of the Features I’ve added to FOG is to check all hosts that currently have a task. If they have not checked in at all, they will be resent the WOL packet. The reason for this? Because I’ve seen some networks will, seemingly arbitrarily, block some systems from receiving the packet. Waiting a period of time and resending the packet seems to work. That’s not to say this wouldn’t still have it’s uses, but just saying that we’ve added checks and balances to try helping with problems such as these.

            [quote=“Nik777, post: 34029, member: 649”]
            So I wrote a cancellation task, which I schedule for 3am. Then, any Virus scan task that has not run by 3am is automatically cancelled, so the users could use the machine when they come in.

            While I only implemented the UI to support a canccellation task for the virus scan, the cancellation task can be applied to any other type of scheduled task.

            Any and all comments are welcome.

            Cheers!
            Nik[/quote]

            I think the best approach for this would to create a TaskType that specifically does this. The weird thing about this method, and I’m guessing you figured out the kinks on this, would be that Tasks are typically associated with hosts. How would one create a task that really isn’t host associated? Furthermore, how could we get a “cancellation task” so it doesn’t require you going to the Host page to schedule?

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post

            150

            Online

            12.0k

            Users

            17.3k

            Topics

            155.2k

            Posts
            Copyright © 2012-2024 FOG Project