答案 0 :(得分:0)
我想可以使用Windows服务上传文件。我们构建了一种类似的Windows服务,用于以递归方式插入数据库。[1]:https://www.c-sharpcorner.com/article/create-windows-services-in-c-sharp/
protected override void OnStart(string[] args)
{
WriteToFile("Service is started at " + DateTime.Now);
Fileupload();
timer.Elapsed += new ElapsedEventHandler(OnElapsedTime);
timer.Interval = 1000*60*60*10; //number in milisecinds
//timer.Interval = 1000 * 60;
timer.Enabled = true;
}
private void OnElapsedTime(object source, ElapsedEventArgs e)
{
Fileupload();
WriteToFile("Service is recall at " + DateTime.Now);
}
///您可以在Serivce Cs文件中使用以上两个函数,并定义用于上传文件的自定义文件上传功能。希望这对您有用