Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng

Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng (http://quantrinet.com/forum/index.php)
-   Thủ Thuật Máy Tính, Internet, Mạng Căn Bản (http://quantrinet.com/forum/forumdisplay.php?f=475)
-   -   Lập lịch tự động restart service hàng ngày với Scheduler Task on Windows (http://quantrinet.com/forum/showthread.php?t=9962)

hoctinhoc 22-12-2015 04:00 PM

Lập lịch tự động restart service hàng ngày với Scheduler Task on Windows
 
Lập lịch tự động restart service hàng ngày với Scheduler Task on Windows


Bài hướng dẫn sau sẽ hướng dẫn các bạn lập lịch tự động restart lại dịch vụ "ClickHome 3 service" hàng giờ

===> Để lập lịch restart lại service 30 phút 1 lần thì bạn chọn option:

Repeat Task every 30 minutes for a duration a day.




Below solution should only be used for ClickHome2. ClickHome 3 service should never be restarted automatically.


ClickHome windows service is responsbile for the following



1. Sending callups to suppliers
2. Running baseline and forecast
3. Processing PO loads
4. Integration with external systems ( eg: Databuild/Beams /CRM/Timberline etc..)
5. Document Groveller ( integrating documents into ClickHome)


If there are any issues with any of the above,clickhome support team would suggest to create a windows auto scheduler task that restarts the service every day / once a week.


Please find the steps to create a windows auto scheduler task which restarts the service every day.


Step 1: Open Task Scheduler ( Control Panel -> Administrative Tools -> Task Scheduler)


Step 2: Create Task
http://cdn.freshdesk.com/data/helpde...jpg?1373430391


Name the task, description and select security options
http://cdn.freshdesk.com/data/helpde...jpg?1373430420


Step 4: Create Task - Trigger. Set up scheduled to run the task


http://cdn.freshdesk.com/data/helpde...jpg?1373430642


The below setting is to schedule the task to run daily at 4.00 AM


http://cdn.freshdesk.com/data/helpde...jpg?1373430658


Step 5: Create Task - Action.


We will set up a program RestartCHServiceDaily.bat to stop and start the ClickHome Service.


a. Identify the name of the ClickHome Service from service properties


http://cdn.freshdesk.com/data/helpde...jpg?1373431053


b. Open Notepad and place the commands to start and stop the service. Save the file as RestartCHServiceDaily.bat


http://cdn.freshdesk.com/data/helpde...jpg?1373431107


c. Specify the action. We will run the program RestartCHServiceDaily.bat
http://cdn.freshdesk.com/data/helpde...jpg?1373431480


Step 6: Create Task - Conditions. Leave the default settings
Step 7: Create Task - Settings. Leave the default settings. Click Ok. You may be prompted to enter user account details.
Step 8: Verify the task in Task Scheduler library and test if your account can run the task
http://cdn.freshdesk.com/data/helpde...jpg?1373431630


Click Run to verify if you user account is able to run the task successfully. Verify the history for any errors and take appropriate action.
Your user account should have permissions to execute the netstart and netstop commands, if there are issues please check with your network administrator.


Bây giờ là 12:44 PM. Giờ GMT +7

Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.