PeterSmith.Org

Updating my calendar (again)

    I have written a a few times about importing Fastmail calendars into orgmode.

    This week, I have been reworking it; I had move to using Exchange/Outlook for my calendaring again, but whilst on RSL/sabbatical, I walked away from that approach, and returned to having my calendar in Fastmail and importing the details into orgmode.

    All pretty good, but for so unknown reason, I resorted to using Windows' Task-scheduler to launch the import every hour. Not fun, as it pops up a window (and grabs the focus) whenever the script runs.

    So, back to using cron under WSL.

    First, I made sure that cron could be started by anyone. So a quick sudo visudo to make sure it had a line like this:

    
      %sudo ALL=NOPASSWD: /usr/sbin/service cron start

    Then I set up task to run the command C:\Windows\System32\wsl.exe with the options sudo /usr/sbin/service cron start when the PC starts up.

    Finally, I edited my crontab (crontab -e) and put in the following line to run the my import script between 06:00 and 17:00 every 50 minutes.

    
      50 6-17 * * * /mnt/c/Users/psmith/Dropbox/psmith/bin/getFastmailCalendar.sh > /dev/null 2>&1

    Now I am watching top to make sure the script runs :)


    Webmentions
    If you webmention this page, please let me know the URL of your page.

    BTW: Your webmention won't show up until I next "build" my site.

    Word count: 200 (about 1 minutes)

    Published:

    Updated: 17 Oct '23 16:16

    Author: Peter Smith

    Permalink: https://petersmith.org/blog/2023/10/17/updating-my-calendar-again-/

    Section: blog

    Kind: page

    Bundle type: leaf

    Source: blog/2023/10/17/updating-my-calendar-again-/index.org