CRMfusion Forums

How to Auto Run a batch using the scheduler  


0

Hello,

   I run Demandtools and Job Builder on a Windows server. I have Job Builder which runs a batch at 7:00am every morning. Sometimes the box gets rebooted so then I have to log in and restart job builder and open the batch. I can add Job Builder to the startup folder so on reboot, Job Builder will reload but is there a way to also get it to reload the batch and keep it on the schedule? I tried adding the batch to the startup folder but on startup, it just executes the batch and bypasses the 7:00am schedule. 

Thanks!

Mark

 
0

Hi Mark,

Reading your question the problem seems to be that if the machine gets rebooted you have to manually login again.

There are a couple of different ways to automatically have Windows login on a boot/reboot. The official MS instructions are at:

https://support.microsoft.com/en-ca/help/324737/how-to-turn-on-automatic-logon-in-windows

Once you have the user being auto logged in there should be nothing else you have to do. JobBuilder uses Windows task scheduler by inserting a task in the scheduler via the JobBuilder interface. Once the task is initially created it should always be there and then at the trigger time will execute as always. There is no reason to have JobBuilder open or in the boot menu to autostart.

Hope this helps, please get back to me.

Thanks

 

Mark Esdale
VP Business Development
CRMfusion, Inc.

Hi Mark,

    Thanks very much for your reply. The auto login is actually working. I setup a reg file and I have DemandTools to auto login and that piece works ok.

Where I am struggling is if the machine reboots, I have Job Builder in the Startup folder and job builder starts automatically but it comes up with nothing to run. I am also trying to get it to load the production batch I setup which is on a schedule and I cannot figure out how to do that.

If I put the batch itself into the startup folder, the batch will run automatically after a system reboot but will not honor the schedule I setup in Job Builder.

I am trying to get Job Builder to come up with the batch details and have it still run on the schedule. As it works right now, Job Builder does come up but loads nothing to run on the schedule.

I was thinking maybe there is a line I can ad to the ini file that says on startup load this batch? 

 

Best Regards,

Mark

1

Hi Mark,

The fact that you already have the JobBuilder batch scheduled in Windows Scheduler is the determining factor here. If it is scheduled and working fine (sounds like it is (with the .reg file)) then there is nothing else you need to do other than have the computer automatically login to Windows on reboot.

So lets say I have a batch scheduled to run from JobBuilder. That task has already been inserted into Windows Task Scheduler. You can call up Task Scheduler and see the job sitting in the list. Such as:

Once it is in this list it will run automatically at the trigger time as long as the user is logged into Windows. There is no need to put JobBuilder into the startup folder or to specify the batch file to be run, the Windows task knows how to do all that by itself.

In the above example that JobBuilder batch will execute everyday at 7:02am as long as the computer is on and the user is logged in (manually or automatically) to Windows.

Make sense?

Mark Esdale
VP Business Development
CRMfusion, Inc.

Hi Mark,

  Thanks for the clarification. I was not using Windows Scheduler to run JobBuilder. It is running on a separate server so I just leave it running and the batch executes at 7:00am each day. If the server restarts, it just reloads Job Builder without the batch. I will try using Windows Scheduler.  Just to clarify, should I add the batch to Windows Scheduler or Job Builder itself? When I added the batch to the startup folder, it executed automatically when the machine restarted so I think i I add the batch to Windows Schedule for 7:00am, the batch will run at that time. 

I'll test it out against or sandbox. 

Thanks, Mark

0

Hi Mark.

You actually are using Windows scheduler. When in JobBuilder you hit schedule it inserts a Windows task into the Windows scheduler. Thats why you can just shut down JobBuilder after scheduling, Windows scheduler will take care of it from then on.

Mark Esdale
VP Business Development
CRMfusion, Inc.

 
  
Working

Please Login or Register