Equiv of a CRON job?

Discussion in 'ASP .Net' started by Andrew Banks, Apr 8, 2004.

  1. Andrew Banks

    Andrew Banks Guest

    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?
     
    Andrew Banks, Apr 8, 2004
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:KNadc.5427$...
    > 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?
    >
    >
     
    Kevin Spencer, Apr 8, 2004
    #2
    1. Advertising

  3. Andrew Banks

    Andrew Banks Guest

    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" <> wrote in message
    news:%...
    > 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" <> wrote in message
    > news:KNadc.5427$...
    > > 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?
    > >
    > >

    >
    >
     
    Andrew Banks, Apr 8, 2004
    #3
  4. Andrew Banks

    Scott Guest

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

    Scott

    "Andrew Banks" <> wrote in message
    news:KNadc.5427$...
    > 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?
    >
    >
     
    Scott, Apr 8, 2004
    #4
  5. 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" <> wrote in message
    news:KNadc.5427$...
    > 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?
    >
    >
     
    Bryan Donaldson, Apr 8, 2004
    #5
  6. 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" <> wrote in message
    news:mRbdc.5451$...
    > 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" <> wrote in message
    > news:%...
    > > 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" <> wrote in message
    > > news:KNadc.5427$...
    > > > 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?
    > > >
    > > >

    > >
    > >

    >
    >
     
    Alex Papadimoulis, Apr 8, 2004
    #6
  7. 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" <> wrote in message
    news:mRbdc.5451$...
    > 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" <> wrote in message
    > news:%...
    > > 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" <> wrote in message
    > > news:KNadc.5427$...
    > > > 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?
    > > >
    > > >

    > >
    > >

    >
    >
     
    John Timney \(Microsoft MVP\), Apr 8, 2004
    #7
  8. Andrew Banks

    pebbleshehe

    Joined:
    Aug 29, 2007
    Messages:
    1
    Hello

    Hello World, I am new here.
    I am a huge U2 and trash metal music junkie
    I play basketball and like playing ping pong.
    I enjoy this great forum www.velocityreviews.com.
    Another thing I have a great time doing, but am just getting into is the swingers lifestyle
    just wanted to say hi
    Please don't critize me just because I like swingers dating
     
    pebbleshehe, Sep 6, 2007
    #8
  9. Andrew Banks

    PeteJ

    Joined:
    Jul 30, 2012
    Messages:
    1
    PeteJ, Jul 30, 2012
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nikola Skoric

    cron job times out

    Nikola Skoric, Nov 24, 2006, in forum: Python
    Replies:
    0
    Views:
    310
    Nikola Skoric
    Nov 24, 2006
  2. Arne Vajhøj

    Re: cron job or EJB timer?

    Arne Vajhøj, Sep 7, 2008, in forum: Java
    Replies:
    1
    Views:
    671
    Robert Klemme
    Sep 13, 2008
  3. Arne Vajhøj

    Re: cron job or EJB timer?

    Arne Vajhøj, Sep 6, 2008, in forum: Java
    Replies:
    0
    Views:
    458
    Arne Vajhøj
    Sep 6, 2008
  4. baytes

    Cron Job Output

    baytes, Dec 2, 2009, in forum: Python
    Replies:
    1
    Views:
    340
    LoD MoD
    Dec 3, 2009
  5. Dev_SH
    Replies:
    0
    Views:
    352
    Dev_SH
    Jan 28, 2011
Loading...

Share This Page