Class: FluentCommandBuilder::Schtasks::V61::Change

Inherits:
CommandBase
  • Object
show all
Defined in:
lib/fluent_command_builder/command_builders/schtasks_61.rb

Instance Method Summary collapse

Methods inherited from CommandBase

#configure!, #execute!, #to_s

Constructor Details

#initialize(underlying_builder) ⇒ Change

Returns a new instance of Change.



155
156
157
158
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 155

def initialize(underlying_builder)
  super underlying_builder
  @b.append ' /change'
end

Instance Method Details

#computer(computer, username = nil, password = nil) {|@b| ... } ⇒ Object

Yields:

  • (@b)


164
165
166
167
168
169
170
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 164

def computer(computer, username=nil, password=nil)
  @b.append " /s #{@b.format computer}"
  @b.append " /u #{@b.format username}" unless username.nil?
  @b.append " /p #{@b.format_password password}" unless password.nil?
  yield @b if block_given?
  self
end

#delete_upon_completion {|@b| ... } ⇒ Object

Yields:

  • (@b)


231
232
233
234
235
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 231

def delete_upon_completion
  @b.append ' /z'
  yield @b if block_given?
  self
end

#disable {|@b| ... } ⇒ Object

Yields:

  • (@b)


221
222
223
224
225
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 221

def disable
  @b.append ' /disable'
  yield @b if block_given?
  self
end

#duration(duration) {|@b| ... } ⇒ Object

Yields:

  • (@b)


196
197
198
199
200
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 196

def duration(duration)
  @b.append " /du #{@b.format duration}"
  yield @b if block_given?
  self
end

#enable {|@b| ... } ⇒ Object

Yields:

  • (@b)


216
217
218
219
220
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 216

def enable
  @b.append ' /enable'
  yield @b if block_given?
  self
end

#end_date(end_date) {|@b| ... } ⇒ Object

Yields:

  • (@b)


211
212
213
214
215
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 211

def end_date(end_date)
  @b.append " /ed #{@b.format end_date}"
  yield @b if block_given?
  self
end

#end_time(end_time) {|@b| ... } ⇒ Object

Yields:

  • (@b)


191
192
193
194
195
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 191

def end_time(end_time)
  @b.append " /et #{@b.format end_time}"
  yield @b if block_given?
  self
end

#help {|@b| ... } ⇒ Object

Yields:

  • (@b)


236
237
238
239
240
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 236

def help
  @b.append ' /?'
  yield @b if block_given?
  self
end

#kill {|@b| ... } ⇒ Object

Yields:

  • (@b)


201
202
203
204
205
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 201

def kill
  @b.append ' /k'
  yield @b if block_given?
  self
end

#repetition_interval(interval) {|@b| ... } ⇒ Object

Yields:

  • (@b)


186
187
188
189
190
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 186

def repetition_interval(interval)
  @b.append " /ri #{@b.format interval}"
  yield @b if block_given?
  self
end

#run_as(username, password) {|@b| ... } ⇒ Object

Yields:

  • (@b)


171
172
173
174
175
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 171

def run_as(username, password)
  @b.append " /ru #{@b.format username} /rp #{@b.format_password password}"
  yield @b if block_given?
  self
end

#run_only_when_logged_in {|@b| ... } ⇒ Object

Yields:

  • (@b)


226
227
228
229
230
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 226

def run_only_when_logged_in
  @b.append ' /it'
  yield @b if block_given?
  self
end

#start_date(start_date) {|@b| ... } ⇒ Object

Yields:

  • (@b)


206
207
208
209
210
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 206

def start_date(start_date)
  @b.append " /sd #{@b.format start_date}"
  yield @b if block_given?
  self
end

#start_time(start_time) {|@b| ... } ⇒ Object

Yields:

  • (@b)


181
182
183
184
185
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 181

def start_time(start_time)
  @b.append " /st #{@b.format start_time}"
  yield @b if block_given?
  self
end

#task_name(task_name) {|@b| ... } ⇒ Object

Yields:

  • (@b)


159
160
161
162
163
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 159

def task_name(task_name)
  @b.append " /tn #{@b.format task_name}"
  yield @b if block_given?
  self
end

#task_run(task_run) {|@b| ... } ⇒ Object

Yields:

  • (@b)


176
177
178
179
180
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 176

def task_run(task_run)
  @b.append " /tr #{@b.format task_run}"
  yield @b if block_given?
  self
end