Task Scheduler as a Service

BatchPatch Forums Home Forums BatchPatch Support Forum Task Scheduler as a Service

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12982
    Drew
    Participant

    I’m not sure if I’m doing something wrong, something is broken, or if it’s just not possible.

    I would like to have a scheduled task while logged out. I have batchpatch running as a service but it essentially is doing nothing as I can’t get anything to run on a schedule unless i have the BPS grid open on the desktop.

    Can someone please give me some pointers or some documentation to follow as I’ve exhausted what I can do from the help file and intuitively from the interface.

    Thanks in advance.

    #12983
    doug
    Moderator

    You have to add a grid to the service instance. You can do this by either right-clicking on the tab header of a grid and choosing ‘Send grid to service instance’ or you can manage which grids are in the service instance under ‘Tools > Run BatchPatch as a service’

    https://batchpatch.com/running-batchpatch-as-a-service

    #12985
    Drew
    Participant

    Thanks Doug.

    That resolves my concern that it’s not possible to do but that’s what I’m doing. I guess we’re on to the something I’m doing wrong or some broken. The document you’ve linked is the one that I followed to set it up, so we can assume I have that correct.

    I must have something set up wrong with the scheduled task or I have the service installed incorrectly? Is there an error log that I can check? If I look at BatchPatchAudit.log I can’t see anything obvious.

    The scheduled task I’m using is just sending an email.

    Not sure what to do next… Thank you for the help so far.

    #12986
    doug
    Moderator

    OK let’s do a couple of things.

    1. Are you using the latest version of BatchPatch? Start with just making sure you have the latest version of BP. (Help > Check for updates)

    2. Next, make sure that the service instance is up to date. If you go to ‘Tools > Run BP as service’ is there an update available? If yes, apply it. If there is no update available, there will be no option available to “update service.”

    3. Start with a brand new grid. Do not use/load an older grid/.bps file.

    4. In the new grid create a scheduled task, but don’t use the email notification option. Instead create a scheduled task to ‘Execute job queue’, and make sure the task is set for a time a few minutes in the future. Then save the grid and send it to the service instance. Then launch the service instance viewer so that you can watch it in real-time. To do this go to ‘Tools > Run BP as a service’ and then select the .bps file in the list of “Currently active .bps files”, and then click ‘Launch selected .bps file in viewer’.

    The goal here first is to see if there is an issue specifically with ‘Send email notification’ running in the service (or perhaps with how you are using ‘Send email notification’) or is there an issue with *any* scheduled task running in the service instance. So I want to know if ‘Execute job queue’ works in the service instance or not. The job queue itself can remain empty, so when ‘Execute job queue’ runs at the scheduled time, the ‘All Messages’ column will show something like this:

    08/01 20:54:47> Job Queue: Queue is empty
    08/01 20:54:47> Job Queue: Queued…
    08/01 20:54:47> Scheduled Task: Initiating ‘Execute job queue’ – Sunday – 08/01/21 – 20:54.

    #12987
    Drew
    Participant

    1. Latest version confirmed
    2. Update service is greyed out
    3. Done
    4. I’ve created a new job queue using ‘Get C: Disk Space’

    This test as you described worked fine.

    Using the grid created above: I have removed the grid from the service, cleared the scheduled task, added it back in 2 minutes in the future, saved the grid, closed the grid, added the grid to the service, closed batch patch and logged out. After logging back in I can see in the log for the host that it has worked as intended !!

    In my previous tests the email sends fine with the grid open and a user logged in as well as running as a service if the user is logged in and the viewer open. That is to say, I did the same test as you suggested and it was fine. I can therefore conclude that there is something wrong with the grid file that I have been using. I will recreate my grid file will all of the hosts that need to be in it and hopefully my issues have been resolved.

    Thanks for the help, I’ll update this thread once I’m done and everything is tested but I think we can assume that my issue is resolved.

    #12988
    doug
    Moderator

    Excellent!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.