Copy Daily Note

At $DAYJOB I use Daily Notes as a daily checklist of sorts. In the morning I’ll go through email and chat notifications since the prior day and build a list of ticket numbers that need to be looked at, then figure out a list of what I’m going to work on that day, and then start working on things.

During the day, people will interrupt me and ask what I’m working on, and where such-and-such is on my list. Interruptions are the bane of my existence. When I’m working on something I tend to go into this “laser focus” mode where I make really good progress, by ignoring anything and everything else. (I’ve heard others refer to this as “flow state” or “deep work”.) But if somebody interrupts me while I’m “in the zone” like this, it can take me 15-20 minutes to figure out where I was. (This is me at work.)

Historically, when somebody would ask me for an update, I had to stop what I was doing and look at the list to answer them. I ended up writing a script which copies the current day’s daily note file to a file on a shared drive, and when people ask for an update I would run that script real quick and then tell them to go read the file on the shared drive.

Then I added a cron job to run that script every five minutes automatically, so that in theory I wouldn’t need to be interrupted at all. That helped, but some people didn’t like having to wait up to five minutes for the file to update, and kept interrupting me anyway. Because of this, I figured out how to use the Shell commands plugin to run the script, and now it gets copied about five seconds after I stop editing it, giving those other people what amounts to a “live view” of the current day’s Daily note. (And if they use Marked2 to view it, their view updates automatically as well.)

The first script (which I was running from a cron job) has the source directory and target filename hard-coded into it, so anybody who wants to use it would need to edit the script. The second script started that way as well, but over the weekend I updated it to use the Daily notes plugin’s “Date format” and “New file location” settings to figure out the source file, made it take the target filename from the command line, added command line options for other configurable settings, and updated the page on my web site which explains how to set it up.

This page has more details, including the scripts themselves.