I had the task set for 11:22 AM.
The log files shows that the launcher ran but it does not state why. There is no entry to state that it was launched as a scheduled task.
Can we please get a feature added that creates a level 1 event for schedule tasks?
I do this with a custom setting, it lets me not only put when something ran but allow it to be used in other scripts. I also send a message to Microsoft teams as a webhook and can make 0365 automation such as power automate to excel for data recordings for some experiments I do.
The sequence retrieves the current date and time from the system clock and stores it in a variable named âdate.â
{
âkindâ: âluaâ,
âargsâ: {
âluaâ: âenv("rpin53","date")â
}
}
I donât know what you mean by a custom setting. I am new to FB coding and I can write good sequences and sensible LUA code (simple stuff at the moment).
By âscheduled taskâ , do you mean a Farm Event execution ?
Youâll need to intercept log records from FBOS using methods already outlined in other posts.
I use the farmbot-js JavaScript package to do this but there are a few other ways.
Farm Event execution commencement is logged like this to the FBOS IEx console and elsewhere:
04:55:00.053 [info] Next execution is ready for execution: now
04:55:00.085 [info] Starting --- Forum 9188 ---
04:55:00.131 [info] Turning Boxled3 ON
04:55:00.142 [info] Writing servo: 11: 90
04:55:00.228 [info] Turning Boxled3 OFF
04:55:00.239 [info] Completed --- Forum 9188 ---
iex(farmbot@farmbot-0000000058098dc9.local)8>
Edit: Ooops, sorry, that Next execution . . . log record is produced by Logger and not FarmbotOS.Logger so wonât be sent to MQTT clients.
You might be better off with @jturbett 's ideas ?
A simple code change in FBOS would send that around the network but there are implications to assess.
Why do Farm events not get logged? The steps within the sequences do, but not the fact that an Event triggered something to happen. I found it a little odd.
I would have thought this would be a level-1 Info (FB has launched something) followed by a Level-1 success if it was completed successfully or a level-1 error if it failed. Or even better, a new class of log entries called âEventsâ
I think this should be embedded in FBOS because if you had a fully automatic farm, would you not want to know that everything was cool just by looking at that one thing
The Farm Event sequence scheduling code is arcane and bespoke (imho) . . take a look.
Open Source Software means youâre welcome to find a better solution ( with Tests ) and offer it up for possible inclusion into a future FBOS release (Your Name in Lights )
FarmBot Inc. has a Team of 1 Engineer/Developer a.t.m.