[QODBC-Desktop] How to run QODBC applications on a repeating/nightly basis
Posted by Jack - QODBC Support on 19 October 2015 12:35 PM
How to use QODBC with Windows scheduler / How to use Z-Cron with QODBC / How to run QODBC applications on a repeating/nightly basis
Problem Description 1:
My application needs read data from QuickBooks and update data in SQL server, up-to this I can able to handle everything. But I need the solution for task scheduler, my need is my application needs to run every one hour through task scheduler, I'm trying this, but it giving the error message like:
"Could not start QuickBooks"
Problem Description 2:
I have a batch file that runs a query using the QODBC driver. It runs perfectly when I logged in, but when I run it as the scheduled task I get this error:
Unable to connect to QuickBooks Connection String: DSN=BPCQB_PROD_batch;DFQ=;OpenMode=F;SERVER=QODBC, OLE Automation Error. The source is Microsoft OLE DB Provider for ODBC Drivers." [QODBC] Server Edition of QODBC is required to use the DCOM Servers."
Windows Scheduler has changed from Desktop base to Service based from Vista or Win7 onwards, and the new OS has the Scheduler as Service based.
QuickBooks and QODBC are desktop based application/driver.
Even if you have specified the username/password and have a user logged into the machine, you may notice the same error. This is because task executed from Task Scheduler runs as a different user / new session.
How to use Z-Cron with QODBC
You can download Z-Cron from below mentioned link:
After downloading Z-Cron, please install it on your machine.
After Installation please start Z-Cron and add task by Clicking the "Task" button.
Enter Task Title in Label box & enable "Activate Task" option to activate the scheduled task and choose Program by clicking ".." button.
Select the file which you want to schedule & click "OPEN". In this example, I am selecting VBS script.
Now navigate to "Scheduler" tab to schedule export. In this example, I am scheduling export to every day two times (i.e. 8:00 AM & 5:00 PM).
Click on "Every day" button to select all weekdays & click on "Scheduler" to configure schedule timing.
Select time & click on "Save".
Now save the scheduled job by clicking the "Save" button
The scheduled job is saved.
The scheduled task is ready for the execution. It will be run on schedule time.