Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Ruby で Windows サービスを作る
Search
y-okubo
June 02, 2016
Technology
1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ruby で Windows サービスを作る
表参道.rb 1 周年 LT
y-okubo
June 02, 2016
More Decks by y-okubo
See All by y-okubo
Akasaka.go #2
okubo
0
240
Other Decks in Technology
See All in Technology
ブラウザとサーバーから考えるAI時代のフロントエンド監視
shogo4131
3
940
AI × アーキテクト 第1・2章|生成AIの課題とアーキテクトの素養
daidaidai
0
170
Temporal 最高!でも改めて「日付」について調べたら人類の負債すぎる件
riyaamemiya
0
150
DevelopersIO 2026 知識の地図を描く ─ オントロジーとは何か?
ishikawa_satoru
1
1.7k
hackers_champloo_2026_tidb
makocchi
0
160
分析AIエージェントを育てる、動く環境を育てる
codatum
1
1.1k
オントロジーって 結局なにもの? AI エージェントに「意味」を渡す知識設計の話
greenmidori
0
200
スキマバイトという雇用形態は存在しないので、雇用期間1日のアルバイト契約を事業者とワーカーが結ぶ手続きを支えるのがタイミーなんです
akitoshiga
0
200
NDIでApple Vision Proにリアルタイム映像送信
jyouryuusui
0
120
コンテナ運用におけるネットワーク・コンテナコストの削減方法/How to Reduce Network and Container Costs in Container Operations
masakiokuda
1
190
パッチ更新でterraform initが落ちた日
grimoh
1
140
実践!Cloud Run ハンズオン!! / Cloud Run handson
y0hgi
2
280
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
We Are The Robots
honzajavorek
0
400
A Tale of Four Properties
chriscoyier
163
24k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
Writing Fast Ruby
sferik
630
63k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Making Projects Easy
brettharned
120
6.8k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
410
Transcript
3VCZͰ8JOEPXT αʔϏεΛ࡞Δ
දࢀಓSC Ұप͓ΊͰͱ͏͍͟͝·͢
֎͚-5ॳ
࣭ 3VCZͰ8JOEPXTαʔϏεΛ࡞ͬͨࣄ͕͋Δʁ
ΞδΣϯμ w ࣗݾհ w ฐࣾհ w #BDLQVMTF֓ཁ w 8JOEPXTαʔϏεԽ w
·ͱΊ
ࣗݾհ w :VLJ0LVCPʢZPLVCPʣ w /FLPKBSBTIJ*OD w $ 3VCZ 0CKFDUJWF$ +BWB
(P w 8FC J04 049
/FLPKBSBTIJ*OD
#BDLQVMTF
ΞʔΩςΫνϟ w ΫϥυόοΫΞοϓαʔϏε w Πϯϑϥɿ"84 w αʔόɿ3VCZPO3BJMT w ΫϥΠΞϯτɿ+BWB +BWB'9
3VCZ
8JOEPXT"QQMJDBUJPO 4FSWFS 8JOEPXT4FSWJDF
31$4FSWJDF*OUFSGBDF &OHJOF $PNNPO -JCSBSZ
31$4FSWJDF*OUFSGBDF w .FTTBHF1BDL31$ w ֤ݴޠ͚ʹϥΠϒϥϦ͕͋Γ҆ఆ͍ͯ͠Δ w ϓϩΩγΫϥεͳͲ͕ඞཁͳ͍͘қ͍
8JOEPXTαʔϏεԽ
ͳͥαʔϏεԽʁ w ػೳͱͯ͠ఆظόοΫΞοϓ͕͋ΔͷͰ όοΫάϥϯυͰ࣮ߦͤ͞Δඞཁ͋Γ
୳ͯ͠Έͨ w EKCFSHXJOTFSWJDF w XJOTX
EKCFSHXJOTFSWJDF
EKCFSHXJOTFSWJDF w ϓϩδΣΫτޙ·Ͱ༻ w ҆৺ͷ(FN w ෦Ͱ''*Ͱ0QFO4$.BOBHFS ͳͲͷ 8JO"1*Λݺͼग़͍ͯ͠Δ
XJOTFSWJDF 4$.
ར w αʔϏε͔Βͷ௨Λड͚औΔ͜ͱ͕Ͱ͖Δ w αʔϏεͷύϥϝλࢦఆ͕3VCZ͔ΒͰ͖Δ
ܽ w CVOEMFFYFDͰ͖ͳ͍ w (FN͕ఏڙ͢ΔΫϥεΛΈࠐΉඞཁ͕͋Δ
αʔϏεॲཧ require 'win32/daemon' include Win32 class DemoDaemon < Daemon def
service_init end def service_main(*_args) end def service_stop end DemoDaemon.mainloop // ແݶϧʔϓ end
ͦͷଞ w TFSWJDF@QBVTF w TFSWJDF@SFTVNF w TFSWJDF@OFUCJOEBEE
w TFSWJDF@OFUCJOESFNPWF w TFSWJDF@OFUCJOEFOBCMF w TFSWJDF@OFUCJOEEJTBCMF
αʔϏεొ Service.new( :service_name => SERVICE_NAME, :display_name => SERVICE_DISPLAYNAME, :description =>
'Sample Ruby service', :binary_path_name => ‘/usr/bin/ruby demo_daemon.rb’ ) ͜ͷΑ͏ͳهड़Λͨ͠3VCZεΫϦϓτΛ࣮ߦ͢Δͱ 8JOEPXTʹαʔϏε͕ొ͞ΕΔ
LPITVLFXJOTX
LPITVLFXJOTX w ϓϩδΣΫτޙ͔ΒҠߦ w όΠφϦˍઃఆϑΝΠϧʢ9.-ʣͷߏ w 3VCZઐ༻ͱ͍͏༁Ͱͳ͍
XJOTX XJOTXFYF XJOTXYNM 4$. EBFNPOSC
ར w CVOEMFFYFD͕͑Δ
ܽ w αʔϏε͔Βͷࡉ͔͍௨ड͚औΕͳ͍ w αʔϏεͷύϥϝλࢦఆTDίϚϯυͰ w ઃఆϑΝΠϧ͕ࡶ
ઃఆϑΝΠϧ <service> <id> BackpulseEngine </id> <name> BackpulseEngine </name> <description> BackpulseEngine
</description> <env name="PATH" value="\Users\y-okubo\.rbenv\versions\2.2.2\bin; %PATH%;"/> <env name="BUNDLE_GEMFILE" value="Gemfile"/> <executable> ruby </executable> <arguments> "\Users\y-okubo\.rbenv\versions\2.2.2\bin\bundle" exec ruby src\engine_daemon.rb </arguments>
αʔϏεొ w ଐͷXJOTXFYFΛϦωʔϜ ྫɿKFOLJOTFYF w KFOLJOTFYFJOTUBMM
αʔϏε࣮ߦ w ී௨ʹॻ͚0, w ແݶϧʔϓࣗͰ࣮
αʔϏεௐ sc config BackpulseManager type= own start= auto error= normal
group= NetworkProvider
·ͱΊ
XJOTFSWJDF w ͓खܰʹಈ͔͍ͨ͠ w 8JOEPXTͱີʹ࿈ܞ w αʔόઐ༻ڥͰಈ͔͢
XJOTX w ઃఆϑΝΠϧ͕ࡶ w ىಈɾऴྃͰेͰ͋Δ w CVOEMFFYFDΛ͍͍ͨ
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠