Click here to Skip to main content
12,690,140 members (31,302 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB VB.NET

I currently have a process when a user clicks a button on the page the program fetches a file from via Ftp and then reads the file and inserts the data into a database table.

I would like to know how would I be able to let this process run automatically at a certain hour? lets say 12:05am daily
Posted 9-Dec-12 21:22pm
Comments 10-Dec-12 4:45am
you have to write a job in sql server which calls a stored procedure and that stored procedure should download the file from ftp and insert the contents into database.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can use the Windows Service which is designed for similar purposes and bundled with Windows; you can use it on different levels. It is called Window Task Scheduler, see[^].

First, you can schedule events using command-line utilities AT.EXE or CSHTASKS.EXE (which is replacing AT.EXE), see:[^],[^],[^],[^].

And you also can use Window Task Scheduler API, please see:[^],[^].

To see how can you use it with .NET, see this CodeProject article: A New Task Scheduler Class Library for .NET[^].

Abhinav S 11-Dec-12 0:43am
Thank you, Abhinav.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

You can create a scheduled task by using the CSTaskScheduler task[^].
Yes, a 5.
Abhinav S 11-Dec-12 0:52am
Thank you SA.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170117.1 | Last Updated 11 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100