Run a macro after reboot activity settles down

Hi, @mill-twice-0w.

As @hemicyon noted above, the UPTIME() function works great for time elapsed since reboot.

For those that might need to delay after login, this works nicely...

Group.kmactions (3.6 KB)

echo $(($(date +%s) - $(stat -f %c /dev/console)))

The If Then Else action provides an option to put a shell script directly in the action, but I prefer the above method because it is easier to debug and it is somewhat self-documenting.

But for those that favor brevity...

If Then Else.kmactions (2.5 KB)

1 Like