Skip to Content
Author's profile photo Jitendra Kansal

Let Task Scheduler take care of SAP Mobile Platform services

It is possible to start/stop SMP services via Task Scheduler. I followed this discussion to try this out. Wanted to share my findings on this:

 

Note:

  • This was done just to test how SMP start/stop services could be planned for a given schedule.
  • If you are using a custom database with SAP Mobile Platform, starting and stopping SAP Mobile Platform Server has no effect on the database. Only the

default SAP SQL Anywhere database is automatically stopped and started in sync with SAP Mobile Platform Server (Ref. help.sap.com)

 

Pre-requisite: 1. SMP runtime should be installed on your machine (or should have remote access to the system)

2. Local Administrator role

3. SMP services should not be running and their Startup Type should be set to manual. (CTRL+R->services.msc)

 

/wp-content/uploads/2016/06/1_964667.png

 

Steps:

 

1. open ‘Task Scheduler’ (OR CTRL+R ->taskschd.msc )

/wp-content/uploads/2016/06/2_964668.png

 

2. Action->Create Basic Task

/wp-content/uploads/2016/06/3_964669.png

 

 

3. Since i just wanted to test how this would work, i triggered it with ‘One time‘ option

6.PNG

 

4. Here, i had to give date-time to run this task (it may vary for the options selected in step# 3)

 

7.PNG

5. No more choice here, just select first option

24.PNG

 

6. Point to go-service.bat batch command SMP installation path)

 

26.PNG

7. Make sure to select checkbox

28.PNG

 

8. As you click on ‘Finish’, properties dialog box appears. Make sure to select ‘Run with highest privileges’ option

11.PNG

 

9. I could see command window appearing on my machine on the time as set during Step# 4 . It took a while to start SMP services.

 

 

30.PNG

 

Note: verify SMP Services again in services.msc

 

21.PNG

 

Note: There is a way to delete this schedule task, search your task under ‘Active Tasks’ list, double click on it ->Delete

(for modify schedule timing, look under Actions)

13.PNG

10. Same way, task can be created to STOP SMP services. Point to stop.bat file.

 

14.PNG

 

 

29.PNG

 

To confirm this, open services.msc->

 

23.PNG

 

 

 

Hope this helps.

 

Thanks Wayne Smith for your inputs.

 

Regards,

JK

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Alok Kumar
      Alok Kumar

      Hello JK,

      The steps provided is very helpful.

      But I have one query. Sometimes the Java process still keep running after the service is stopped. So in that case the Task scheduler aim would fail.

      Would suggest any way how we can make sure that Java process is stopped before starting the Service.

       

      Thanks

      Alok