Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


anirban
2009-06-15T11:35:36Z
Hello,

We have a CRM application (reusable COM components and ASP/VB Script is used).
In this application we presently use Windows Scheduler for scheduling jobs.

We need to replace the usage of Windows Scheduler by VisualCron API for COM.
The only Sample code provided in the VisualCronAPI.pdf has been tested and working good.

Can I get a VB/ASP sample code, that can use VisualCron API to

1. Create a task from a VB Script file.
2. Schedule that task for execution at every 15 minutes interval.
3. Edit the task to modify it's scheduling parameters (Start time, interval etc).

Appreciating your help/support quickly.
Sponsor
Forum information
Support
2009-06-15T12:05:39Z
Please give us a couple of days to produce such a sample.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
anirban
2009-06-15T12:20:59Z
I will wait for this sample code.

Thanks for your help.
Support
2009-06-17T14:54:41Z
We are no experts on VBScripts and can only provide you with the general code in c# or VB.NET. Which one do you prefer?

What kind of Task do you want?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
anirban
2009-06-17T15:52:46Z
A.

1. We have a VB script, that calls (if executed) an ASP file.
2. The ASP file logs into a particular email A/C and reads each message and sends auto reply to them (in a pre-defined format). This is for our customer helpdesk.


Presently, we use Windows Scheduler to schedule the VB Script 1. above, at interval of time, say 15 minutes.

We just want to stop using Windows Scheduler and switch to Visual Cron scheduler.
Our business process flow (steps 1 and 2 above) will remain the same.


B.

We are not having .Net development platform. It is a COM based development platform.
That's why, I requested for VB Script using your COM API.

Ok, send me the VB .Net code for above kind of task (section A)


C.

Also, can you send me a better quality documentation and help for your COM API, where from I can at least understand :

1. Purpose of each method and Property
2. Input parameters (with Variable type)of methods and their return types
3. A few lines of explanation of the methods / properties.
Support
2009-06-17T15:58:06Z
A. How do you want to call the ASP file. By HTTP?
B. We lack VBScript knowledge. That is why.
C. We don't have any better documentation. Let me know if you find a property that is not described in documentation (chm-file).
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
anirban
2009-06-17T16:51:00Z
A. Yes, as following:

Set objHTTP = CreateObject("Microsoft.XMLHTTP")objHTTP.open "POST", "http://localhost/test.asp", False

B. I understand. But you told you will produce one.
No issues, send me the VB .Net sample code that can schedule a task like A.

C. A person who begins with a new product API knows nothing about it.
So, a couple of explanation lines are necessary : Purpose of a method/property.
Otherwise, how can one understand where to start with ?

If you send me the VB .Net code for a task like A, I can at least know the name of the method to start with and the next methods to be used.
anirban
2009-06-17T16:52:24Z
Sorry, these are 2 different lines:

Set objHTTP = CreateObject("Microsoft.XMLHTTP")

objHTTP.open "POST", "http://localhost/test.asp", False
Support
2009-06-17T17:07:35Z
C. We tend to focus on .NET since it is superior to VBScript. That is why we already have provided a sample project in the API folder of VisualCron.

B. We thought you needed general help - not specific Vbscript help.

anirban wrote:

A. Yes, as following:

Set objHTTP = CreateObject("Microsoft.XMLHTTP")objHTTP.open "POST", "http://localhost/test.asp", False

B. I understand. But you told you will produce one.
No issues, send me the VB .Net sample code that can schedule a task like A.

C. A person who begins with a new product API knows nothing about it.
So, a couple of explanation lines are necessary : Purpose of a method/property.
Otherwise, how can one understand where to start with ?

If you send me the VB .Net code for a task like A, I can at least know the name of the method to start with and the next methods to be used.



Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2009-06-17T19:04:16Z
Here is some sample code, unfortunately only in c# but it is very basic:

			// Create connection
			Connection conn = new Connection();
			// specify if it is local connection
			conn.ConnectionType = Connection.ConnectionT.Local;
			// Connect
			Server s = c.Connect(conn,true);
			
			if (s != null)
            {
                if (s.Connected)
                {
                    // create JobClass
                    JobClass j = new JobClass();
                    // set name of Job
                    j.Name = "Custom HTTP Job";
                    // add description to Job
                    j.Description = "Calls ASP script";

                    // create interval trigger for last friday in month
                    TriggerClass tr = j.AddTrigger(TimeClass.TimeTriggerT.Interval);
                    tr.Description = "Run every 15 minutes";
                    // Set init date (when it should start calculation)
                    tr.TTime.InitDate = DateTime.Now;
                    // specific days of the month
                    tr.TTime.IntervalType = TimeClass.IntervalT.Minutely;
                    // every 15 minutes
                    tr.TTime.IntervalValue = 15;

                    // create task
                    TaskClass tc = j.AddTask(TaskClass.TaskT.HTTP);
                    // set name of Task
                    tc.Name = "Calls ASP script";

                    // new option in version 5.1.6
                    tc.HTTP.HTTPParameterType = TaskHTTPClass.HTTPParameterT.StringParameter;
                    tc.HTTP.Method = "POST";
                    tc.HTTP.URL = "http://localhost/test.asp";
                    tc.HTTP.Parameters = ""; // enter any parameters you may have

                    // send Job to Server
                    s.Jobs.Add(j);
                    
                }
            }

Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
anirban
2009-06-18T13:03:38Z
Many thanks for this code. It helped me to identify the entry point of this work.

Please look at the document attached.

So, we need to download the version, the C# code is written for. Is it written for the version, it prompts us to download? Do we need to download the 5.1.6 client? From where can we get the corresponding server version?
anirban
2009-06-19T10:28:21Z
We downloaded the latest 5.1.6 software and tried the same VB code.
But same errors come and in 5.1.6 COM API also the Class members (used in code) are found to be absent. Could you make those required members available for us in COM Class library (at least the ones that our COM based application will use...Creation, modification and deletion of Job with single Task)?

We have our application available in both technology, COM and .Net and the Technology Officer will choose only that software which has API fully exposed for both technology.
Support
2009-06-23T00:04:04Z
I hope you make the decision to use .NET instead of COM.

The question is if the JobClass object could be created or not - can you view any other JobClass property (like Id) in a messagebox?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
anirban
2009-06-23T06:51:22Z
As I told earlier, we have both COM and .Net versions of our web based application.
We have several hundreds of customers to support, who are using the COM version.

Please find the attached document, showing the test with id property of JobClass.

Also, the TriggerClass and TaskClass are showing NO MEMBERS in the object browser.
Support
2009-06-24T11:37:03Z
We see the problem now. It seems like not all properties where generated because of this warning. We will fix this in a new version (remove warnings).

Thank you for the report and your patience.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
anirban
2009-06-24T12:23:56Z
Thanks for this update.

Can we expect the new version release in a couple of weeks (we can wait)?

Best regards.
Support
2009-06-24T16:25:45Z
You will get this update by the end of the week.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2009-06-25T18:14:55Z
Please try version 5.1.9 from the beta forum.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
anirban
2009-07-06T14:09:23Z
Hello Henrik,

I was going through the cases of your forum, but no where I found any download link for version 5.1.9. Please give me the URL ...from where I can download beta version 5.1.9.
anirban
2009-07-06T16:13:39Z
Hi Henrik,

Thanks for the download link.

But as I tried the version 5.2.0 the program output was same as I got for older 5.1.2 and 5.1.6 versions. The COM API Class members expected by the code are found to be absent as before. Please look at the attached document.

Could you please show this attached document to your development team?
The VB code written by me is a line by line translation of the C# code from you.
So, could you please confirm whether this component (VisualCron 5.2.0) is at all 100% programmable from COM compliant languages ? (Y/N)
Support
2009-07-06T16:27:44Z
Yes, we tested this against VB6.

If you get the same output (warnings) I can only guess that you are using the old files.

Please uninstall everything and work against the program files folder to ensure that you are building the correct tlb-file.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
anirban
2009-07-06T17:03:02Z
(A)
Following is my sequence of action for trying the latest 5.2.0 version:


1. I deleted the Registry keys that were created by the Regasm command for 5.1.6 dlls.
2. I uninstalled 5.1.6 version from my machine.
3. From the "C:\Program Files\Microsoft Visual Studio\VB98\" folder I deleted the 2 dlls and 2 tlb's for version 5.1.6.

4. I installed 5.2.0 version.
5. I copied the 2 dlls from "C:\Program Files\VisualCron\" folder to "C:\Program Files\Microsoft Visual Studio\VB98\" folder.
6. I issued the following command (for each of the 2 dlls)
regasm "C:\Program Files\Microsoft Visual Studio\VB98\VisualCron.dll" /tlb:VisualCron.tlb
7. Then I executed my VB6 code sample (within "C:\Program Files\Microsoft Visual Studio\VB98\" folder).


(B)
Even if I use early binding
(Project-> Reference -> browsing the .tlb file paths from VB98 folder), the Object browser does not show the Id, Name, Description properties of the JobClass in VisualCron library (VisualCron.tlb). Only member being shown is "Clone" method.

Please suggest if I am doing wrong any where.
Please let me know how you tested this with VB6 and found it working/successful.
anirban
2009-07-06T17:18:01Z
Also, I guess I did not get the warning (while issuing the Regasm command) for this version. But the output of the VB6 sample code is the same as earlier versions.
Support
2009-07-06T18:35:21Z
We think the problem might be our code protection tool. We will get back to you once this is tested.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top