[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

how to set windows service run in first of every month

Posted on 2012-08-29
6
Medium Priority
?
382 Views
Last Modified: 2014-10-24
how to set windows service run in first of every month
0
Comment
Question by:rajivkumarsharmas
  • 2
4 Comments
 
LVL 13

Expert Comment

by:xDUCKx
ID: 38346308
Are you trying to do this progamatically or thru the Windows GUI/Command line?
0
 

Author Comment

by:rajivkumarsharmas
ID: 38346318
programatically through WINDOWS SERVICE.PLEASE PROVIDE THE CODE IF POSSIBLE
0
 
LVL 14

Accepted Solution

by:
ThomasMcA2 earned 2000 total points
ID: 38346530
Create a task in the Windows Scheduler that runs the following command at 12:01 am on the first of the month:

net start your_service_name.exe

Open in new window


If the computer will be on 24/7, then turn off the service with another task in the Windows Scheduler that runs at 12:01 am on the 2nd of the month:

net stop your_service_name.exe

Open in new window

0
 
LVL 14

Expert Comment

by:ThomasMcA2
ID: 38398910
If you're satisfied that your question has been answered, could you please also accept the answer so that the question is marked as 'answered'.
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
Suggested Courses
Course of the Month18 days, 21 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question