First of all, I did check hundreds of previous posts but I still have a problem. I have a T-SQL cursor. And I want to run this cursor every 5 minutes. In order to do that I've made a *.bat file (sqlcmd -S DEAMON\SQLEXPRESS -i reminder_cursor.sql) that runs it. Batch file and cursor file are both in the same folder (f.e. sql_cursor) and they both have the same name (f.e. reminder_cursor.bat, reminder_cursor.sql). In taskschd is:
General tab
When running the task, use the following user account: SYSTEMdon't want to see console windowrun with the highest privilegestickedrun whether user is logged on or notticked
Triggers tab
begin a task on a scheduleDailyrecur every 1 dayRepeat task every 5 min for duration indefinitelyEnabledticked
Actions tab
Action: start a programProgram scripthas exact path to thebatfileStart in (Optional):has exact path to the folder wherebatfile is stored
When I run the same bat file manually, it works (every time). Next run time goes forward, but doesn't run batch.