How to start Solr on system startup?

1. Create new bat file,  write below steps in that and save file.

cd /
cd solr-7.5.0
cd bin
solr start -p 8983

[Note: Make sure you specify correct path of your solr folder, our solr path is c:/ > Solr-7.5.0]

2. Search for “Task Scheduler” in the Start Menu. Select “Task Scheduler Library” on the left panel, and click on the "Create  Task" option appearing on the right panel.



3. In the General tab enter a proper name and description. If the task needs administrative privileges, select the check box “Run with       highest privileges.”




4. We need to create a trigger. For that, go to "Triggers" tab and click "New".




5. Select a trigger from the drop down menu. Since I want to start a program with delayed startup, I am selecting the "At Startup"        

    option. You can select any other trigger you want. The delay functionality is available for all triggers except the "on idle" trigger.


6. After selecting the event, select the check box "Delay task for," and select the number of minutes from the drop down menu. In our     case I'm delaying the program launch for "15 minutes" after starting the system. Click "OK" to continue.



7. Now, go to the “Actions” tab and click 'New.'



8. Select an action. In my case that is “Start a Program.” Select a program by clicking on the “Browse” button. If the program needs    

    any additional arguments, you can enter them in the “Add Arguments” field. Click “OK” to continue.



9. (Optional) If you are on a laptop, you might want to make the task start only when using AC power. If that’s the case, go to the      

    “Conditions” tab and select the checkbox "Start the task only if the computer is on AC power."



10. You can leave the “Settings” tab as is. Click the “OK” button to complete the task creation process.


Finally, to verify if the task runs properly, right-click on it in the main window and select the option “Run.” If there are no errors, the task should run instantly.