I have a problem with RunScheduledTask (new in Mathematica 8).
A task that I usually need to do is to set a cron to start at a specific time and repeat itself at the same time every day (or the same minute every hour, and so on...)!
Let's make an example: suppose I have to run Pippo[] at 5:00 AM every day starting from tomorrow. These are the "logic" steps in my mind to do so:
- calculate the absolute time of tomorrow at 5:00 and save it to
ABSTIME - execute
RunScheduledTask[Pippo[], 60*60*24, ABSTIME]
Unfortunately I have discovered that if I make it this way IT WON'T EXECUTE tomorrow at 5:00, but it will start the day after. I tried to set as ABSTIME the absolute time of today at 5:00 but it doesn't work either ('cause the ABSTIME is in the past). The only work-around I found is:
- calculate the absolute time of tomorrow at 5:00 and save it to
ABSTIME - calculate amount of seconds from now to tomorrow at 5:00 and save it as
SECSREMAINING - execute
RunScheduledTask[Pippo[], {SECSREMAINING}]for the execution of tomorrow - execute
RunScheduledTask[Pippo[], 60*60*24, ABSTIME]for all other executions
I think this a very "an-elegant" way, do you have any other solution? Or should we mass-warn Wolfram about this and make it change? ;)

ABSTIMEof 5:00 today and use that in the call toRunScheduledTask? I haven't tested it, but from the described behaviour it seems to me it would start for the first time tomorrow at 5:00, as intended. – celtschk Feb 2 '12 at 16:24RunScheduledTask[Pippo[], 10, AbsoluteTime[]-5], following your reply it should executePippo[]after 5 seconds, but it executesPippo[]after 10 seconds, exactly the same results as launching the command without a first execution time specification. – Francesco Feb 2 '12 at 17:04