Batch and Script scheduler help needed

Batch and Script scheduler help needed

Anonymous
Not applicable
938 Views
2 Replies
Message 1 of 3

Batch and Script scheduler help needed

Anonymous
Not applicable

Good morning,

I have a batch and script which work together to do some tasks without my having to attend to them.

The Batch file starts AutoCAD, then runs a script which contains a set of custom commands to do extracts and plot dwf files.  Examples below...

When I initiate the batch file manually it all runs perfectly to the very end; all dwfs are plotted fully and extracts completed correctly.  That is, if people aren't working in their files; can't replace a dwf if it's open by someone. 

If I set up Windows Task Scheduler to run the batch/script in the middle of the night, each task is only partially carried out, but doesn't complete.  I get partial dwfs and partially completed extractions.

I would rather run this at 2:00 a.m. because at that time people are not working in their files and the dwfs can be overwritten.

 

The batch file looks like this:

START "" "C:\Program Files\Autodesk\AutoCAD 2018\acad.exe" /b "C:\Scripts\EXTRACTS.scr"

 

The Script is simply a list of custom commands:

BZEXTRACT
NCEXTRACT

RFS2DWF
D1XDWF

QUIT
Y

 

My machine is running Windows 10

 

The help I need is getting this to run in the middle of the night and run properly and completely.  Are there any tricks to getting Windows Task Scheduler to function properly?  Has anyone else seen commands only partially complete when using Task Scheduler?  If so, how did you get around it?  Is there a way to force a command in a script to fully complete before going on to the next one?  Is there a better way to go about this? 

 

As always, I appreciate the experience and sharing I find on this forum.  Thank you for any helpful responses.

 

Erik

0 Likes
939 Views
2 Replies
Replies (2)
Message 2 of 3

maratovich
Advisor
Advisor

Why do not you use a .dwg print?

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 3 of 3

Anonymous
Not applicable

Maratovich,

 

Thank you for taking time to reply.  My purpose is to publish multi-sheet dwf files and perform extractions from drawings.  I have code which works quite well when I initiate manually from my desktop.  The problem is that if I initiate the set of apps from Windows Task Scheduler, each app is visited, but only the first portion of each extraction dll gets performed.  The app isn't run to completion, but rather each dll is abandoned partway and then the next one is initiated.  There's something about using Task Scheduler which is preventing apps from completing.  I'm wanting to know if a) anyone knows enough about task scheduler to set it up to complete a task, or b) if anyone knows some trick to put in my app which will force the apps to complete before going on to the next one. 

 

I was probably unclear in my description of the help I'm seeking.  Sorry about that. 

 

Erik

 

0 Likes