I am having a problem using the timespec specified in the Wolfram documentation for ScheduledTask. I believe the issue has been extant since v11.
Let's take an example from the documentation:
obj = LocalSubmit[ScheduledTask[DateString[], "Hourly"],
HandlerFunctions -> <|"ResultReceived" -> Print|>,
HandlerFunctionsKeys -> "EvaluationResult"]
Check the list of tasks:
Remove the task:
Confirm the task has been removed:
Now specify the same scheduled task, with a starting date/time. This works ok:
obj = LocalSubmit[ScheduledTask[DateString[], {Now, "Hourly"}],
HandlerFunctions -> <|"ResultReceived" -> Print|>,
HandlerFunctionsKeys -> "EvaluationResult"]
But when we try to specify a start date, it fails:
obj = LocalSubmit[ScheduledTask[DateString[], {Now, "Hourly"}],
HandlerFunctions -> <|"ResultReceived" -> Print|>,
HandlerFunctionsKeys -> "EvaluationResult"]
It looks as if the task has been scheduled:
But this is highly misleading - there is nothing scheduled:
Nor does datelist format work:
obj = LocalSubmit[
ScheduledTask[DateString[], {{2019, 12, 23, 9, 35, 0}, "Hourly"}],
HandlerFunctions -> <|"ResultReceived" -> Print|>,
HandlerFunctionsKeys -> "EvaluationResult"]
I have made numerous other attempts to get ScheduledTask to work as per the documentation, without success.
Is anyone aware of a workaround?