473,387 Members | 1,611 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 2334
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****@nojunkblueyonder.co.uk> wrote in message
news:KN*********************@news-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****************@TK2MSFTNGP10.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****@nojunkblueyonder.co.uk> wrote in message
news:KN*********************@news-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****@nojunkblueyonder.co.uk> wrote in message
news:KN*********************@news-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****@nojunkblueyonder.co.uk> wrote in message
news:KN*********************@news-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****@nojunkblueyonder.co.uk> wrote in message
news:mR*********************@news-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****************@TK2MSFTNGP10.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****@nojunkblueyonder.co.uk> wrote in message
news:KN*********************@news-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****@nojunkblueyonder.co.uk> wrote in message
news:mR*********************@news-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****************@TK2MSFTNGP10.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****@nojunkblueyonder.co.uk> wrote in message
news:KN*********************@news-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
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
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...
4
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...
3
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...
5
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...
4
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
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...
0
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...
1
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...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...

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.