473,796 Members | 2,629 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Equiv of a CRON job?

When I've developed PHP sites before we've had a server facility called a
CRON job to set a certain page to run at pre-defined periods (schedule it)

Is there an equvalent for ASP.NET/IIS? I've got some scripts which I could
do with running daily and wondered the best way to do this?
Nov 18 '05 #1
6 1442
You have a couple of alternatives. The closest fit to your problem would be
a Windows Service that can perform a scheduled task. That would require
installing the Service on the host machine, which may or may not be
possible. Another alternative is to include code in your Session_OnStart
Event Handler, which checks the date and time and runs or doesn't run a task
at the beginning of a user's Session.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Andrew Banks" <ba****@nojunkb lueyonder.co.uk > wrote in message
news:KN******** *************@n ews-text.cableinet. net...
When I've developed PHP sites before we've had a server facility called a
CRON job to set a certain page to run at pre-defined periods (schedule it)

Is there an equvalent for ASP.NET/IIS? I've got some scripts which I could
do with running daily and wondered the best way to do this?

Nov 18 '05 #2
First option seems more reliable but I won't have that option as I'm on a
shared server.

Second option is good but not as reliable. If no one visitis the site, no
sessions are started and hence nothing will be run.

Does anyone know any other alternatives?

"Kevin Spencer" <uc*@ftc.gov> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
You have a couple of alternatives. The closest fit to your problem would be a Windows Service that can perform a scheduled task. That would require
installing the Service on the host machine, which may or may not be
possible. Another alternative is to include code in your Session_OnStart
Event Handler, which checks the date and time and runs or doesn't run a task at the beginning of a user's Session.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Andrew Banks" <ba****@nojunkb lueyonder.co.uk > wrote in message
news:KN******** *************@n ews-text.cableinet. net...
When I've developed PHP sites before we've had a server facility called a CRON job to set a certain page to run at pre-defined periods (schedule it)
Is there an equvalent for ASP.NET/IIS? I've got some scripts which I could do with running daily and wondered the best way to do this?


Nov 18 '05 #3

You could just run a scheduled task (outside of IIS/ASP); I guess it depends on your scripts.

Scott

"Andrew Banks" <ba****@nojunkb lueyonder.co.uk > wrote in message
news:KN******** *************@n ews-text.cableinet. net...
When I've developed PHP sites before we've had a server facility called a
CRON job to set a certain page to run at pre-defined periods (schedule it)

Is there an equvalent for ASP.NET/IIS? I've got some scripts which I could
do with running daily and wondered the best way to do this?

Nov 18 '05 #4
the Windows system equivalent to CRON is "AT"

The AT command schedules commands and programs to run on a computer at
a specified time and date. The Schedule service must be running to use
the AT command.

AT [\\computer] [ [id] [/DELETE] | /DELETE [/YES]]
AT [\\computername] time [/INTERACTIVE]
[ /EVERY:date[,...] | /NEXT:date[,...]] "command"

\\computername Specifies a remote computer. Commands are scheduled on
the
local computer if this parameter is omitted.
id Is an identification number assigned to a scheduled
command.
/delete Cancels a scheduled command. If id is omitted, all the
scheduled commands on the computer are canceled.
/yes Used with cancel all jobs command when no further
confirmation is desired.
time Specifies the time when command is to run.
/interactive Allows the job to interact with the desktop of the user
who is logged on at the time the job runs.
/every:date[,...] Runs the command on each specified day(s) of the week or
month. If date is omitted, the current day of the month
is assumed.
/next:date[,...] Runs the specified command on the next occurrence of the
day (for example, next Thursday). If date is omitted,
the
current day of the month is assumed.
"command" Is the Windows NT command, or batch program to be run.
"Andrew Banks" <ba****@nojunkb lueyonder.co.uk > wrote in message
news:KN******** *************@n ews-text.cableinet. net...
When I've developed PHP sites before we've had a server facility called a
CRON job to set a certain page to run at pre-defined periods (schedule it)

Is there an equvalent for ASP.NET/IIS? I've got some scripts which I could
do with running daily and wondered the best way to do this?

Nov 18 '05 #5
Andrew,

Unless your host will allow you to run a scheduled task (try askin them), it
looks like you're out of luck. If you post the specific task your trying to
do, perhaps we can help you with some work arounds.

Alex Papadimoulis
"Andrew Banks" <ba****@nojunkb lueyonder.co.uk > wrote in message
news:mR******** *************@n ews-text.cableinet. net...
First option seems more reliable but I won't have that option as I'm on a
shared server.

Second option is good but not as reliable. If no one visitis the site, no
sessions are started and hence nothing will be run.

Does anyone know any other alternatives?

"Kevin Spencer" <uc*@ftc.gov> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
You have a couple of alternatives. The closest fit to your problem would be
a Windows Service that can perform a scheduled task. That would require
installing the Service on the host machine, which may or may not be
possible. Another alternative is to include code in your Session_OnStart
Event Handler, which checks the date and time and runs or doesn't run a

task
at the beginning of a user's Session.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Andrew Banks" <ba****@nojunkb lueyonder.co.uk > wrote in message
news:KN******** *************@n ews-text.cableinet. net...
When I've developed PHP sites before we've had a server facility
called a CRON job to set a certain page to run at pre-defined periods (schedule it)
Is there an equvalent for ASP.NET/IIS? I've got some scripts which I could do with running daily and wondered the best way to do this?



Nov 18 '05 #6
Iif you have the ability to create applications - you could try spawning a
thread in application on_start that sits ticking away doing your schedule
check.

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
"Andrew Banks" <ba****@nojunkb lueyonder.co.uk > wrote in message
news:mR******** *************@n ews-text.cableinet. net...
First option seems more reliable but I won't have that option as I'm on a
shared server.

Second option is good but not as reliable. If no one visitis the site, no
sessions are started and hence nothing will be run.

Does anyone know any other alternatives?

"Kevin Spencer" <uc*@ftc.gov> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
You have a couple of alternatives. The closest fit to your problem would be
a Windows Service that can perform a scheduled task. That would require
installing the Service on the host machine, which may or may not be
possible. Another alternative is to include code in your Session_OnStart
Event Handler, which checks the date and time and runs or doesn't run a

task
at the beginning of a user's Session.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Andrew Banks" <ba****@nojunkb lueyonder.co.uk > wrote in message
news:KN******** *************@n ews-text.cableinet. net...
When I've developed PHP sites before we've had a server facility
called a CRON job to set a certain page to run at pre-defined periods (schedule it)
Is there an equvalent for ASP.NET/IIS? I've got some scripts which I could do with running daily and wondered the best way to do this?



Nov 18 '05 #7

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

Similar topics

6
2680
by: sherryonline | last post by:
i have a page and i need that page to be called every day at 12:00 that page is going to connect to the database fetch some emails and will start mailing them how i am goning to do this.
6
2354
by: Andrew Banks | last post by:
When I've developed PHP sites before we've had a server facility called a CRON job to set a certain page to run at pre-defined periods (schedule it) Is there an equvalent for ASP.NET/IIS? I've got some scripts which I could do with running daily and wondered the best way to do this?
4
3053
by: vagrantbrad | last post by:
I'm using python 2.4 running on Fedora Core 4. I have written a python program called ipscan.py that checks the external ip address of my cable internet connection, and on change, will update the dns records at my dns provider, zoneedit. So basically, I've setup dynamic dns using python. Once the ip compare and/or update is complete, I log the results to a text file called update.log. When I run the program in a bash shell with the...
3
10314
by: the.natalie | last post by:
Hi. I am a newbie to mysql, cron, and shell scripting, so please bear with me. I have a script that is used for updating an image directory based on contents in a database. The script does the following: runs several queries against different tables in a database; returns several lists of pictures being used in the database; removes any obsolete images from specific directories. The script is bash shell script. The problem is that...
5
3548
by: jcor | last post by:
Hi, I'm trying to run my first cron job, probably it's missing something. I created a perl script just to test, it's called "teste" !/usr/bin/perl open(DATA,">>/home/joao/files/output"); @Now = localtime(time); print DATA "@Now\n"; exit ;
4
3960
by: Phil | last post by:
I have a php script that queries some Oracle DB and outputs a single line of plain text with <brat the end for each query. This is Apache2, php4.4.8 and Oracle Instant Client 10.1.0.5 all on CentOS 4.4 32bit. Php does run as an Apache SO. It works perfectly if I just hit the page in a web-browser (output to browser). It works *perfectly* from the command line (dumps the text to the file per the redirect)
4
7565
by: Stephen Cattaneo | last post by:
Hello all, I am attempting to execute an automated test (written in Python) via cron. I have to check the HOSTNAME variable as part of the test, oddly under cron the HOSTNAME environment variable is not in the os.environ dictionary. I know that cron runs in a subshell that does not have all of the normally set environment variables. HOSTNAME is not one of those variables, it is set even in cron's subshell. Why doesn't python get...
0
3484
by: Cameron Simpson | last post by:
On 17Aug2008 21:25, John Nagle <nagle@animats.comwrote: Because $HOSTNAME is a bash specific variable, set by bash but NOT EXPORTED! Like $0 and a bunch of other "private" variables, subprocesses do not inherit this value. From "man bash": Shell Variables The following variables are set by the shell:
1
2312
by: Karthik Gurusamy | last post by:
Hi, I'm working on a cron like functionality for my application. The outer loops runs continuously waking every x seconds (say x=180, 300, ..). It needs to know what events in cron has expired and for each event do the work needed. It's basically like unix cron or like a calendar application with some restrictions. The outer loop may come back a lot later and many events
0
10223
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
10172
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
9050
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...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6785
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
5441
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...
1
4115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.