473,668 Members | 2,318 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Kickstart script on server?

Hello

I have a page that mails my customers and it times out...... I need some way
to store it as .vbs and just kickstart it from my asp-page so it'll run in
background.

could you guys show me some code on how to do that? I dont have
visual-studio or anything like that so it's got to be "simple" without any
additional com+ programming or anything like that.

TIA
/Lasse
Jul 19 '05 #1
17 1749
How about this. Have a scheduled task in windows, that checks a database
every five minutes. If a flag says 1, run the VBS script and set the flag
to 0.

Then, you can kickstart it by hitting an ASP page that connects to the same
database and sets the flag to 1.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Lasse Edsvik" <la***@nospam.c om> wrote in message
news:OV******** ******@TK2MSFTN GP12.phx.gbl...
Hello

I have a page that mails my customers and it times out...... I need some way to store it as .vbs and just kickstart it from my asp-page so it'll run in
background.

could you guys show me some code on how to do that? I dont have
visual-studio or anything like that so it's got to be "simple" without any
additional com+ programming or anything like that.

TIA
/Lasse

Jul 19 '05 #2
Aaron,

is it possible to send parameters to a vbs script?
"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:On******** ******@TK2MSFTN GP09.phx.gbl...
How about this. Have a scheduled task in windows, that checks a database
every five minutes. If a flag says 1, run the VBS script and set the flag
to 0.

Then, you can kickstart it by hitting an ASP page that connects to the same database and sets the flag to 1.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Lasse Edsvik" <la***@nospam.c om> wrote in message
news:OV******** ******@TK2MSFTN GP12.phx.gbl...
Hello

I have a page that mails my customers and it times out...... I need some

way
to store it as .vbs and just kickstart it from my asp-page so it'll run in background.

could you guys show me some code on how to do that? I dont have
visual-studio or anything like that so it's got to be "simple" without any additional com+ programming or anything like that.

TIA
/Lasse


Jul 19 '05 #3
Yes, have a look at the WScript documentation at msdn.microsoft. com. You
can also store such parameters in the database when you switch the flag...
that way you have a record of which parameters were used the last time the
VBS script was called.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Lasse Edsvik" <la***@nospam.c om> wrote in message
news:Oc******** *****@TK2MSFTNG P09.phx.gbl...
Aaron,

is it possible to send parameters to a vbs script?
"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:On******** ******@TK2MSFTN GP09.phx.gbl...
How about this. Have a scheduled task in windows, that checks a database
every five minutes. If a flag says 1, run the VBS script and set the flag to 0.

Then, you can kickstart it by hitting an ASP page that connects to the same
database and sets the flag to 1.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Lasse Edsvik" <la***@nospam.c om> wrote in message
news:OV******** ******@TK2MSFTN GP12.phx.gbl...
Hello

I have a page that mails my customers and it times out...... I need
some way
to store it as .vbs and just kickstart it from my asp-page so it'll

run in background.

could you guys show me some code on how to do that? I dont have
visual-studio or anything like that so it's got to be "simple" without any additional com+ programming or anything like that.

TIA
/Lasse



Jul 19 '05 #4
Aaron,

i need to pass a value "CategoryID " that i then use to select emails from
database.

what's the basic code to schedule a script to run now?

and do i pass it like myscript.vbs categoryid=34 ?
"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:OG******** ******@TK2MSFTN GP11.phx.gbl...
Yes, have a look at the WScript documentation at msdn.microsoft. com. You
can also store such parameters in the database when you switch the flag...
that way you have a record of which parameters were used the last time the
VBS script was called.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Lasse Edsvik" <la***@nospam.c om> wrote in message
news:Oc******** *****@TK2MSFTNG P09.phx.gbl...
Aaron,

is it possible to send parameters to a vbs script?
"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:On******** ******@TK2MSFTN GP09.phx.gbl...
How about this. Have a scheduled task in windows, that checks a database every five minutes. If a flag says 1, run the VBS script and set the flag to 0.

Then, you can kickstart it by hitting an ASP page that connects to the

same
database and sets the flag to 1.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Lasse Edsvik" <la***@nospam.c om> wrote in message
news:OV******** ******@TK2MSFTN GP12.phx.gbl...
> Hello
>
> I have a page that mails my customers and it times out...... I need some way
> to store it as .vbs and just kickstart it from my asp-page so it'll run
in
> background.
>
> could you guys show me some code on how to do that? I dont have
> visual-studio or anything like that so it's got to be "simple"

without any
> additional com+ programming or anything like that.
>
> TIA
> /Lasse
>
>



Jul 19 '05 #5
> i need to pass a value "CategoryID " that i then use to select emails from
database.
Why not store CategoryID in the table, then when you set the flag and the
VBS file wakes up, it grabs the categoryID from the database?
what's the basic code to schedule a script to run now?
I don't know what you mean. Either you call the script directly (however,
there are reasons I recommend not doing this: http://www.aspfaq.com/2059),
or you have windows scheduler run every 5 minutes, or every minute, and
check if it should execute the script.
and do i pass it like myscript.vbs categoryid=34 ?
From the command line, you would call it like this:
wscript c:\file.vbs 34


Then in the VBS file, you would say something like categoryID =
wscript.argumen ts[0] ... I forget the exact syntax, as I suggested before,
if you really want to go this route, see the documentation at
msdn.microsoft. com. Personally, I think you have your head wrapped around
the ASP framework and you should really look at this from a windows
perspective.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #6
Aaron,

actually user select's category from a list on an asp-page and types his
message he wants to send, now i need to find some way to pass that subject,
body, sender and the selected categoryid to the script.

or a better way....... if its possible to add a job in sql 2002 that looks
something like:

EXEC MyMailProc @CategoryID=34, @Subject='adsf
asdf',@Body='Ns adfasdf',@Se*** **********@adfs .com'

?
"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:eJ******** ******@TK2MSFTN GP10.phx.gbl...
i need to pass a value "CategoryID " that i then use to select emails from database.


Why not store CategoryID in the table, then when you set the flag and the
VBS file wakes up, it grabs the categoryID from the database?
what's the basic code to schedule a script to run now?


I don't know what you mean. Either you call the script directly (however,
there are reasons I recommend not doing this: http://www.aspfaq.com/2059),
or you have windows scheduler run every 5 minutes, or every minute, and
check if it should execute the script.
and do i pass it like myscript.vbs categoryid=34 ?


From the command line, you would call it like this:
wscript c:\file.vbs 34


Then in the VBS file, you would say something like categoryID =
wscript.argumen ts[0] ... I forget the exact syntax, as I suggested before,
if you really want to go this route, see the documentation at
msdn.microsoft. com. Personally, I think you have your head wrapped around
the ASP framework and you should really look at this from a windows
perspective.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/

Jul 19 '05 #7
> actually user select's category from a list on an asp-page and types his
message he wants to send, now i need to find some way to pass that subject, body, sender and the selected categoryid to the script.


I DON'T UNDERSTAND... WHY CAN'T YOU STORE THIS DATA IN THE DATABASE? Why is
your head stuck on passing them as parameters?

Then you can have multiple rows and have the script execute once for each
row. Then you don't have to worry about a second user calling the script
before the first one runs.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #8
Aaron,

since i figured i'd try not to have some script running every single minute
to check if its gonna do something or not
"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:un******** ******@TK2MSFTN GP09.phx.gbl...
actually user select's category from a list on an asp-page and types his
message he wants to send, now i need to find some way to pass that subject,
body, sender and the selected categoryid to the script.


I DON'T UNDERSTAND... WHY CAN'T YOU STORE THIS DATA IN THE DATABASE? Why

is your head stuck on passing them as parameters?

Then you can have multiple rows and have the script execute once for each
row. Then you don't have to worry about a second user calling the script
before the first one runs.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/

Jul 19 '05 #9
Aaron,

and the email component is on the webserver too, only have one licence, then
i'd have to install it on sql-server too?
"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:un******** ******@TK2MSFTN GP09.phx.gbl...
actually user select's category from a list on an asp-page and types his
message he wants to send, now i need to find some way to pass that subject,
body, sender and the selected categoryid to the script.


I DON'T UNDERSTAND... WHY CAN'T YOU STORE THIS DATA IN THE DATABASE? Why

is your head stuck on passing them as parameters?

Then you can have multiple rows and have the script execute once for each
row. Then you don't have to worry about a second user calling the script
before the first one runs.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/

Jul 19 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4900
by: DeepBleu | last post by:
When one is using an HTML form via a web broswer, the user submits the form contents and these are passed to a CGI Python script on the web server. I need to write a client script that connects to a web site, runs a Python CGI script on the web server AND passes a string to the CGI Python script that the Python CGI script can store/manipulate/evalute etc.... I know how to connect to the web site and run the CGI Python script using a client...
6
2824
by: Paul Winkler | last post by:
This is driving me up the wall... any help would be MUCH appreciated. I have a module that I've whittled down into a 65-line script in an attempt to isolate the cause of the problem. (Real domain names have been removed in everything below.) SYNOPSIS: I have 2 target servers, at https://A.com and https://B.com. I have 2 clients, wget and my python script.
16
3990
by: Fox | last post by:
I merged and modified these script which work perfectly fine as long as I use server.execute to access the VBS part (which is itself in another ASP file). When these I use a session variable to pass an email address from the database. I have had timeout problems and buffer problems and as I understand it, maybe a problem with changing the session variable too many times in one session. So I tried putting the two scripts on one page. When...
5
1750
by: news | last post by:
I have a new situation I'm facing and could use a suggestion or two, as I don't seem to be able to think in the abstract very well. We have a local server which holds all of our image files. We have a remote server that runs our public Web server and mySQL database. I need to be able to run a script that will: Read the contents of a dir on the local server and a. make thumbnails of the files in it b. querey the database and pull...
19
3819
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function myFunc(val1ok, val2ok) ' do something ok myFunc = " return something ok" End Function </script>
1
2680
by: anilkumar1980 | last post by:
Hi All, Here I need help to all of u, I am using ASP.NET 2.0 and Third party Infragistic Controls. I Have included master page in my page (<%@ Page Language="VB" MasterPageFile="~/ServiceReferrals/HCSOS.master" AutoEventWireup="false" CodeFile="HCSOSDetails.aspx.vb" Inherits="HomeCareSOS" %>) then Inculding my js files like <asp:Content ID="HCSoS" ContentPlaceHolderID="HCSOSDetails" runat="server"> <script type="text/javascript"...
3
11290
by: traceable1 | last post by:
Is there a way I can set up a SQL script to run when the instance starts up? SQL Server 2005 SP2 thanks!
5
3480
by: This | last post by:
I have a pretty basic emailing script that sends a relatively small number (150) of html emails. The emails are compiled, personalised from a mysql db subscribers list, and sent using mail() - after sending, a small summary html page is sent to the user with number sent, time taken and a simple navigation choice. Up to about 100 emails it all works fine - this takes the server about 27 secs . Any more than that and although the emails are...
2
2694
by: Jay | last post by:
I have a web app running on the windows CE device. In one of the asp.net pages - it has javascript code. That seems to have a memory leak. When I run the web app - in about one hour, the app hangs. I looked at the memory and it seems to be full. I removed all the javascript code - and the app seems to be have no leaks. As soon as I include my javascript code - the memory consumption gradually increases. Whether I actually invoke the...
0
8459
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8374
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8890
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8791
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8575
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7398
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5677
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.