Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Autorunning ASP from web server
Old 04-02-2007, 04:06 PM Autorunning ASP from web server
Super Talker

Posts: 116
Trades: 0
Hi there,

We do indie music and I wrote an ASP page that will contact an artist two days before they appear on our home page.

Bascially the page determines the month/day and calculates what the day will be in two days. It then connects into a SQL Server 2000 table to pull out the artist that will be used, and emails this artist through ASP Mailer.

We're on a shared server so I asked our hosting service if they could set up a schedule task for us to run at like 1am.

Well, it's not working. They asked me if I could write a Visual Basic exe and send that to them.

Two concerns: 1.) I haven't written a VB exe in 10 years; 2.) How will this affect when we go onto ASP.NET.

I need to get this page to run automatically from our server. Does anyone have any suggestions? Will it be able to run automatically if I wrote it in ASP.NET?

Donna
DonnaZ is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-02-2007, 04:54 PM Re: Autorunning ASP from web server
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
Can you use SQL Mail? That would allow you to schedule the task using SQL Agent ( create a recurring job ), and not impact your ASP/ASP.NET code.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 04-02-2007, 07:55 PM Re: Autorunning ASP from web server
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Just run a scheduled task on YOUR machine to call a page on the remote server.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-02-2007, 07:59 PM Re: Autorunning ASP from web server
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
or you can check if any messages need to be sent each time a page is opened.

assuming you get at least one visitor each day
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-03-2007, 05:10 AM Re: Autorunning ASP from web server
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
Or use Application_OnIdle in Gloal.asa? You could even set it up to run on a timer and call your maintenance page every 15 minutes ... it would have to be less than however long it takes for your application to close.

SQL Mail might be the easiest option, though? You would have to change it if you move up to SQL 2005, but changing the web server code wouldn't have any effect. And as long a the job is set up properly, it doesn't matter whether the web app is running or not.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 04-03-2007, 06:05 AM Re: Autorunning ASP from web server
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Is OnIdle a .NET Application event ?

In ASP ("Classic") there is only OnStart & OnEnd
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-03-2007, 11:49 AM Re: Autorunning ASP from web server
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
DonnaZ: the other option is to write a VBScript file. These can be automatically scheduled and the code is pretty much the same as ASP code (there are some exceptions but you can test it on your end first by opening it up and running it, debugging it, then sending it to your host.)
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 04-03-2007, 01:05 PM Re: Autorunning ASP from web server
Super Talker

Posts: 116
Trades: 0
Thanks everyone for your input. I think the VBScript option might be the one that works... because....

A.) SQL mail is out of the question. We don't own SQL Server and I have no direct access to SQL on our remote shared server.

B.) As for my machine... I'm not going to be at my job anymore in a week. This may be an option, though? How would I set it up? I'm on XP.

C.) For the Global.asa file... doesn't the application still have to be kicked off by someone? Won't this be the same as the page?

D.) We're not on .NET yet.

What kills me is that our WEB HOST doesn't have a clue.

I have VB6 on my home computer (it's like out of VisualDev which is 10 years old). Is there a way to program something in VB6 to call the ASP page?

I really want to get on "Deal or No Deal" and retire.

DonnaZ
DonnaZ is offline
Reply With Quote
View Public Profile
 
Old 04-03-2007, 02:09 PM Re: Autorunning ASP from web server
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
I have VB6 on my home computer (it's like out of VisualDev which is 10 years old).
And I use it just about every day for coding real world apps

Quote:
Is there a way to program something in VB6 to call the ASP page?
Yep, just use the Inet component to POST to or GET the page, or use the Webrowser component to open a URL.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-03-2007, 05:22 PM Re: Autorunning ASP from web server
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
Quote:
Originally Posted by chrishirst View Post
Is OnIdle a .NET Application event ?

In ASP ("Classic") there is only OnStart & OnEnd
Ah, my mistake. I still do a lot of "Classic" work, but it's been a while since I've gone in and tinkered with the application level events.

If you write an exe in VB 6 that makes a request to the specific URL of the asp page that does the mailing, you don't even have to process the response. Simply asking for the page will trigger all your asp code to run.

Sorry to hear that your host doesn't seem very with it. You should be able to add the server to Enterprise Manager, or even send a SQL command to set that up from an asp page, but it's starting to sound like VB 6 is the way to go.

And it may be a decade old, but there are still a lot of production apps written in VB 6, so it's still relevant. Also, the exe you write that requests a particular asp page could be on your computer, on the server, or anywhere else with access to the internet.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 04-04-2007, 02:00 AM Re: Autorunning ASP from web server
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Donna, you just gave me an idea for my next blog post. Thank you. (To be displayed at 4:54 PM EST on my blog.)
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 04-04-2007, 12:40 PM Re: Autorunning ASP from web server
Super Talker

Posts: 116
Trades: 0
Thanks everyone.

I created a VB6.exe this morning... so we'll see how it runs tomorrow at 1am.

I'll tell you... ASP and VB6 are still the best technologies - even if they are 10 years old. I love ASP!

Donna
DonnaZ is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Autorunning ASP from web server
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.36249 seconds with 12 queries