Reputation: 29
I am trying to find a solution of how to execute a JavaScript file a couple of times a day (Like Task Scheduler on Windows) At the moment, I execute the file in VS Code or Command Prompt using node file.js. Is there any way to automatically execute it? I have tried the following with Task Scheduler, but is not executing the file, just opening VS Code:
Action: Start a program Program/script: "C:\Users\AppData\Local\Programs\Microsoft VS Code\Code.exe" Arguments: -l -i -c "C:\Users\desktop\folder_containing_the_file; node writeToFile.js"
Upvotes: 0
Views: 735
Reputation: 67
It can't be executed when the computer is off. But you could use the Amazon AWS Free-Tier services to schedule and run it.
Upvotes: 1