I have a rails app all set on windows 7 machine. I am able to run rails server by running .bat
file (run_rails.bat) which contains the following -
cd C:\Sites\myapp
@call rails s -e production -p 3000
I would like to automatically start the rails app when windows OS boots. For which I tried to create a scheduled task using schtasks.exe
-
schtasks /create /tn my_task /tr "C:\Scheduled Jobs\run_rails.bat" /sc onstart
But when I reboot the system the automated task run fails with message there are currently no logon servers available to service the logon request
however manually running the task by clicking on run
button runs the app fine.
Are there any alternative ways to achieve this, is my approach correct to run the rails app locally ?