How to run uipath main file using windows task schedular

I have created the .bat file and want to run through task scheduler which have failed several times, Is this is the best way to run the uipath main file using windows task scheduler.

@Gauri_Rawool

We have new feature in latest version of community Edition of Uipath studio to schedule Attended BOTS through Agent Desktop. No need of any Windows scheduler and all. Please check below thread and follow the steps.