Cron Job for Windows错误:找不到文件

时间:2021-03-31 01:08:45

Hi When I run my C# Console Application manually just opening it, my internal code in which opens the file \server\folder\database.mdb works fine, but when I run the same C# Console Application openning through a Cron job for Windows It returns the error:

嗨当我手动运行我的C#控制台应用程序时打开它,我的内部代码打开文件\ server \ folder \ database.mdb工作正常,但当我运行相同的C#控制台应用程序打开通过Cron作业的Windows它返回错误:

Could not find the file \server\folder\database.mdb

找不到文件\ server \ folder \ database.mdb

How is it possible, it is inside my c# code, what does Cronjob that gives me this error?

怎么可能,它在我的c#代码里面,Cronjob给我这个错误是什么?

Is there any #path configuration or environment variable or even a default folder that cron job uses, do I need to change something to work with Cron jobs?

是否有任何#path配置或环境变量,甚至是cron作业使用的默认文件夹,我是否需要更改某些内容才能使用Cron作业?

1 个解决方案

#1


The user under which task scheduler is running may not have permissions to that folder

正在运行任务计划程序的用户可能没有该文件夹的权限

#1


The user under which task scheduler is running may not have permissions to that folder

正在运行任务计划程序的用户可能没有该文件夹的权限