3 added 291 characters in body
source | link

This functions

DynamicModule[{i = 0}, 
 Dynamic@Row[{Button["Run", RunScheduledTask[++i, 1]], " ", i}]]

Update

Run a predefined task

Module[{i = 0, t1},
 t1 = CreateScheduledTask[++i, 0.1];
 Row[{
   Button["Run  t1", StartScheduledTask[t1]], " ",
   Button["Stop t1", StopScheduledTask[t1]], " ",
   Button["Reset  ", i = 0], " ",
   Dynamic@i}]]

I didn't find a way to make this run inside a DynamicModule.

This functions

DynamicModule[{i = 0}, 
 Dynamic@Row[{Button["Run", RunScheduledTask[++i, 1]], " ", i}]]

Update

Run a predefined task

Module[{i = 0, t1},
 t1 = CreateScheduledTask[++i, 0.1];
 Row[{
   Button["Run  t1", StartScheduledTask[t1]], " ",
   Button["Stop t1", StopScheduledTask[t1]], " ",
   Button["Reset  ", i = 0], " ",
   Dynamic@i}]]

This functions

DynamicModule[{i = 0}, 
 Dynamic@Row[{Button["Run", RunScheduledTask[++i, 1]], " ", i}]]

Update

Run a predefined task

Module[{i = 0, t1},
 t1 = CreateScheduledTask[++i, 0.1];
 Row[{
   Button["Run  t1", StartScheduledTask[t1]], " ",
   Button["Stop t1", StopScheduledTask[t1]], " ",
   Button["Reset  ", i = 0], " ",
   Dynamic@i}]]

I didn't find a way to make this run inside a DynamicModule.

2 added 291 characters in body
source | link

This functions

DynamicModule[{i = 0}, 
 Dynamic@Row[{Button["Run", RunScheduledTask[++i, 1]], " ", i}]]

Update

Run a predefined task

Module[{i = 0, t1},
 t1 = CreateScheduledTask[++i, 0.1];
 Row[{
   Button["Run  t1", StartScheduledTask[t1]], " ",
   Button["Stop t1", StopScheduledTask[t1]], " ",
   Button["Reset  ", i = 0], " ",
   Dynamic@i}]]

This functions

DynamicModule[{i = 0}, 
 Dynamic@Row[{Button["Run", RunScheduledTask[++i, 1]], " ", i}]]

This functions

DynamicModule[{i = 0}, 
 Dynamic@Row[{Button["Run", RunScheduledTask[++i, 1]], " ", i}]]

Update

Run a predefined task

Module[{i = 0, t1},
 t1 = CreateScheduledTask[++i, 0.1];
 Row[{
   Button["Run  t1", StartScheduledTask[t1]], " ",
   Button["Stop t1", StopScheduledTask[t1]], " ",
   Button["Reset  ", i = 0], " ",
   Dynamic@i}]]
1
source | link

This functions

DynamicModule[{i = 0}, 
 Dynamic@Row[{Button["Run", RunScheduledTask[++i, 1]], " ", i}]]