ResetScheduledTask

As of Version 11.2, ResetScheduledTask has been superseded by operations on TaskObject.

ResetScheduledTask[obj,timespec]

resets the timing for a scheduled task to timespec.

ResetScheduledTask[obj,timespec,offset]

resets the time offset for a scheduled task to offset.

Details and Options

  • ResetScheduledTask returns a single ScheduledTaskObject expression or a list of expressions.
  • ResetScheduledTask stops the task if it was running.
  • When the task is reset, the time until the next activation is set to the full time interval.
  • ResetScheduledTask has attribute Listable.

Examples

Basic Examples  (4)

Reset and restart the timer after it is expired:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=
In[5]:=
Click for copyable input

Reset the timer before its expiration:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
In[4]:=
Click for copyable input

Create a task with random wait periods:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
In[4]:=
Click for copyable input

Create a task that restarts evaluation as soon as it finishes:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input

See Also

AbsoluteTime

Tutorials

Introduced in 2010
(8.0)
| Updated in 2014
(10.0)