HI Dave, I have similar problems when running a workspace under a scheduler too.
The workspace effectively does the same as your script. (Dave is your script an MBX or a workspace?) It opens, then updates a linked SQL server data-only table. Then opens a table with graphics and joins it too the updated table before saving it as a new table. If I open the workspace normally from MapInfo it runs fine, everything happens as it should. If I run from a DOS batch file, then MapInfo opens correctly, the workspace starts to be processed but after a few minutes a dialog box appears saying that there was an error on a certain line (this is a commented line in the workspace) and the workspace could not be fully opened. By clicking OK on the dialog box and dismissing it the rest of the workspace continues to run and everything happens correctly. Of course if this runs every night unattended then the dialog box is not closed and then multiple instances of MI are open. If I run the batch file or workspace from a scheduler (in this case as a MS-SQL Server scheduled job) then an instance of MapInfo is started (I check the task manager) but the program never appears on the desktop and the required files are not created. There are no issues with permissions to the database or the files so I don't think that that is the problem. FYI. The reason I use a workspace is that I want other people, that do not have strong MapBasic or VB skills, to be able to edit/update the workspace in the future. Any ideas gratefully received. TIA. Dave -----Original Message----- From: Dave King [mailto:[EMAIL PROTECTED]] Sent: 07 October 2002 09:27 To: '[EMAIL PROTECTED]' Subject: MI-L Running MapBasic through MS Scheduled tasks Hello list, I'm hoping that someone can shed some light on a problem that I am having when trying to run a mapbasic script through Microsoft Scheduled Tasks on Windows NT 4.0. The problem is that I am unable to run my mapbasic script in it's entirety through scheduled tasks. The script itself is fairly simple, essentially it does 4 things: * It opens a set of tables * It appends then saves the tables * The graphical style of the contents of the appended tables is changed * It then shells out to a Visual basic routine which copies the tables to an archive folder There is nothing wrong with the mapbasic script script itself, it works fine when run normally. When run through scheduled tasks it never completes. No error messages are generated and MapInfo does not crash. I therefore do not know where the problem occurs. I have played about by simplifying my mapbasic routine and can get other scripts to run. The strange thing is that if I remove the part of the script that changes the graphical style of my new appended tables then the script runs fine through task scheduler. The tables are appended and it shells out to the visual basic routine without problem. The problem definitely seems to be with the part of the code that changes the table style. As I say this all runs fine when the script is run from Mapbasic so I really don't understand what is happening here If anyone has any ideas or solutions I'd be grateful as I'm really stuck here. Thanks for your help David King ************************************************************************* The contents of the e-mail and any transmitted files are confidential and intended solely for the use of the individual or entity to whom they are addressed. Transport for London Street Management hereby excludes any warranty and any liability as to the quality or accuracy of the contents of this e-mail and any attached transmitted files. If you are not the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited. If you have received this e-mail in error please notify [EMAIL PROTECTED] This footnote also confirms that this email message has been swept for the presence of computer viruses. ************************************************************************* --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 3428 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 3436
