Code |FrontPage |HiveTraits | ||
Hive-case4
You want each machine to be synchronized to the NTP server in hivehome, and want this to happen each day.
|cat sync.seq
[:channel => '#hive' !do $sys:rdate[hivehome] ] |
|cat sync.seq
[:channel => '#hive' !do $sys:rdate[hivehome] when $cron:syncdate[0 0 0] ] |
trigger :synctrig do |channel, machine, action, args|
case action when /join/ say '!do $sys:rdate[hivehome] when $cron:syncdate[0 0 0]', machine when /part/ #do nothing. end end |
!create trigger synct on #hive for join use synctrig
|
|cat sync.seq
[:channel => '#hive' !do $sys:rdate[hivehome] when $cron:syncdate[0 0 0] ] |
!create trigger synct on #hive for join use {tell @machine,"!do $sys:rdate[hivehome] when $cron:syncdate[0 0 0]"}
|
!create trigger synct for join use !do $sys:rdate[hivehome] when $cron:syncdate[0 0 0]
|