Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

TCL Script - "day of week"

Hi,

I try to implement a weekend shift for saturday and sunday - does anybody know the right syntax to scan the day of week? A Script-sample would be perfect!?

Thanks for the answer in advance

Regards Martin

2 REPLIES
New Member

Re: TCL Script - "day of week"

This is working for me:

set day_of_week [clock format [clock seconds] -format %w]

set hour [clock format [clock seconds] -format %H]

if { $day_of_week == "0" || $day_of_week == "6" || $hour > 20 || $hour < 9 } { # Fuera de horas

puts "Fuera de horas"

media play leg_incoming tftp://192.168.1.254/bienvenidoa.wav tftp://192.168.1.254/weba.wav tftp://192.168.1.254/agentesa.wav

} else {

puts "Horas laborables"

media play leg_incoming tftp://192.168.1.254/bienvenidoa.wav tftp://192.168.1.254/senal2a.wav tftp://192.168.1.254/agentesa.wav

}

New Member

Re: TCL Script - "day of week"

It´s working perfektly - thanks a lot!

By the way one further Question - how could I read in the date, for public holidays?

Thanks again

Regards Martin

620
Views
0
Helpful
2
Replies
CreatePlease to create content