Method: Win32::TaskScheduler#trigger_string
- Defined in:
- lib/win32/taskscheduler.rb
#trigger_string(index) ⇒ Object
Returns a string that describes the current trigger at the specified index for the active task.
Example: “At 7:14 AM every day, starting 4/11/2015”
622 623 624 625 626 627 628 629 630 631 632 633 634 |
# File 'lib/win32/taskscheduler.rb', line 622 def trigger_string(index) raise TypeError unless index.is_a?(Numeric) check_for_active_task index += 1 # first item index is 1 begin trigger = @task.Definition.Triggers.Item(index) rescue WIN32OLERuntimeError raise Error, "No trigger found at index '#{index}'" end "Starting #{trigger.StartBoundary}" end |