• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 226
  • Last Modified:

Scheduling From asp (NOT asp.net) on Windows 2000 Server

I need a Windows scheduler.  It could be Windows Task Scheduler or Shareware or other Commercial product.

I need to be able to do the following.  

-  Need to have an API so that a task can be scheduled from an asp using VB Script.

The scheduler would work the in the following manner.

-  If the current date and time is less than the scheduled time -- nothing happens.

-  If the current date and time is equal to the scheduled time or greater than the scheduled time but within a certain tolerance, the task is to be run.

-  If the current date and time is greater than the scheduled time and outside the tolerance, an email is to be sent to the business user, telling them that their scheduled job was not run.  This is so if we just had a brief server outage, that we would be able to "catch up" and run the overdue tasks when the server comes back up.  However, if a scheduled task, somehow slipped through the cracks and sat out there for months, it would not run immediately but rather notify the owner who would determine whether it was still relevant or not.
0
paul_b_schmidt
Asked:
paul_b_schmidt
  • 4
  • 3
1 Solution
 
Julian HansenCommented:
Why does this have to be ASP?
0
 
paul_b_schmidtAuthor Commented:
I am adding functionality to an existing ASP.  Currently, a business user builds a mailing list, then clicks "Send" and the mailing begins immediately.  I use Windows ShellScript to Start a third party product (Gammadyne Mailer).  The business users have requested the ability to set up mailings in advance and have them go out on the day they specify.  The Mailings are time sensitive, usually to alert our agents to Bulletins which go into effect on a specific day.
0
 
Julian HansenCommented:
Yes, but ASP is a request/response solution. A process accesses an ASP page and gets a response - this means for your solution something is going to have to trigger the ASP script to do the check.

Why not just have a server side process that runs at regular intervals using the AT command or other such scheduling process - if you were going to do this in ASP then you could also do it in VBScript.

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
paul_b_schmidtAuthor Commented:
There are three components:

1)  An asp which builds an email subject and body and mailing list based on business user input.

2) Gammadyne Mailer (gmcom.exe) which sends the mailing based on a project file created by the asp. Currently, gmcom.exe is started by the asp, when the user presses "send", using Windows ShellScript:

strReturn=oWSH.run("""c:\program files\gammadyne mailer\gmcom.exe""  d:\emsg\" &  strMailingNo  &  ".txt",5,FALSE)

3) A scheduler.  This is the new component which will run gmcom.exe in the future.  This does not have to be an asp.  It can be any scheduler that will run on Windows 2000 Server.  The requirement is that I can pass a command line similar to the one above to this component along with a date and time and that I can do that from Component #1, the asp, when the user presses "schdule future mailing".  For example, I have seen sample code where the Windows Task Scheduler can be controlled programmatically using C++.  I want to use VBScript in an asp instead.  I don't think this is possible with the Windows Task Scheduler, so I am looking for a scheduler where this can be done.  The other requirement is that if a mailing is long overdue (maybe the scheduler was down for an extended period of time and has just been restarted), that an email will be sent to the business user rather than running gmcom.exe to send the Mailing.

I am not real hopeful on finding something "off the shelf" that will do all of the above, so I have started programming a work-around where I will store the Mailing info and date and time in a database and run a process periodically to check to see if any mailings are due or overdue and process them accordingly.  Just thought I would check on here, first, to see if anyone knew of such a product to save myself from having to do this.
0
 
Julian HansenCommented:
There are various schedulers out there but I personally wouldn't do it that way.

Logging in a database with a process that regularly checks the status is a much better option in my opinion.

Create the app to check and execute or mail a user.
Setup a Windows Task to run every 20 min (or whatever) to run this app.

You could then have your ASP script only write to the database

This has the added of advantage of being able to provide an audit trail amongst other things.

0
 
paul_b_schmidtAuthor Commented:
Thanks, I am going to close this out and accept your answer.  It isn't the Scheduler product that I was originally asking for, but you have convinced me that doing it this way is better than trying to fit this into a scheduler.
0
 
Julian HansenCommented:
you are welcome
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now