BV Commerce Forum
»
BV Commerce Support
»
General Support
»
How do I schedule a script to run every midnight?
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.
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 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 |
|
|
|
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.
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 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 |
|
|
|
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.
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 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.