• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

monsey11
#1 Posted : Tuesday, August 21, 2012 12:41:49 PM(UTC)
monsey11

Rank: Member

Joined: 8/31/2011(UTC)
Posts: 4

How do I schedule a script to run every midnight?

I'm using it to create feeds and upload them to an FTP location.
Aaron
#2 Posted : Tuesday, August 21, 2012 12:56:36 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
There's no easy way to do this without custom development. If you go down that road there are numerous ways to approach it.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
monsey11
#3 Posted : Tuesday, August 21, 2012 1:09:19 PM(UTC)
monsey11

Rank: Member

Joined: 8/31/2011(UTC)
Posts: 4

I can do custom development or I could do a windows scheduled task.

What would be the right approach?

I would love it to be in code so when we switch servers we don't forget the scheduled tasks.
Aaron
#4 Posted : Tuesday, August 21, 2012 2:32:13 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
BV implements its 'schedule' by hooking into the session start event in the Global.asax file. That works, but it won't guarantee an exact, to-the-second schedule since it's dependent on outside user action. If you need greater accuracy I would do some searching. There are examples out there for how to do it rather than trying to create your own scheduling framework.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
Steve95
#5 Posted : Friday, November 16, 2012 11:38:48 AM(UTC)
Steve95

Rank: Member

Joined: 4/29/2010(UTC)
Posts: 256

Thanks: 4 times
Was thanked: 11 time(s) in 10 post(s)
If you have complete control of the server I would create a windows service. If that is not the case and you do not like the BV approach you could always add something into the cache and have it expire every 24 hours triggering your script upon its expiry.
Aaron
#6 Posted : Friday, November 16, 2012 1:29:10 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
That will only work if the app pool doesn't recycle during that 24 hour period, which is pretty unlikely.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012