Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Special flip-flop through shell timing switch

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The work encountered this strange demand temporarily, so I wrote a shell script to implement this function. In the spirit of open source sharing, we will share practical information with you. I hope I can help you solve this problem in your work.

1. Two scripts need to be set up to turn on and off triggers respectively.

# # this is the shutdown script #! / bin/bashsource / home/oracle/.profilePWD_SYS= "/" sqlplus yxtx$ {PWD_SYS} 123456 # # this is the open shell script #! / bin/bashsource / home/oracle/.profilePWD_SYS= "/" sqlplus yxtx$ {PWD_SYS} 123456

2. Set up linux system to plan tasks

50 23 * / home/oracle/jiankong_close.sh > / home/oracle/jiankong_close.log 2 > & 1

* 7 * / home/oracle/jiankong_open.sh > / home/oracle/jiankong_open.log 2 > & 1

In this way, the trigger can be automatically turned on at 7 o'clock every morning and closed automatically at 11:50 every night.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report