~lioploum/offpunk-users

MacOS: automatic syncing from LaunchAgent

Xavier Maillard <x@maillard.im>
Details
Message ID
<55ec6074816cc9d7ed901ca3f679dbc0@maillard.im>
Sender timestamp
1742133184
DKIM signature
pass
Download raw message
Hello,

I am trying to automate syncing for my offpunk lists via a kind of
cron job (LaunchAgents on MacOS).

Here is the job:

(x) ~/L/LaunchAgents 38.3s ❱ cat offpunk.plist 
───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: offpunk.plist
───────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ <?xml version="1.0" encoding="UTF-8"?>
   2   │ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
   3   │ <plist version="1.0">
   4   │ <dict>
   5   │         <key>Label</key>
   6   │         <string>offpunk</string>
   7   │         <key>ProgramArguments</key>
   8   │         <array>
   9   │                 <string>/Users/x/Git/Projets/offpunk/offpunk.py</string>
  10   │                 <string>--sync</string>
  11   │         <string>--assume-yes</string> 
  12   │         <string>--cache-validity</string> 
  13   │         <string>51840</string>
  14   │         </array>
  15   │         <key>RunAtLoad</key>
  16   │         <true/>
  17   │         <key>StartInterval</key>
  18   │         <integer>90</integer>
  19   │         <key>StandardErrorPath</key>
  20   │         <string>/Users/x/.local/log/offpunk.stderr.log</string>
  21   │         <key>StandardOutPath</key>
  22   │         <string>/Users/x/.local/log/offpunk.stdout.log</string>
  23   │ </dict>
  24   │ </plist>

It works as expected but here is what I have in my output log:

HTML document detected. Please install python-bs4 and python-readability.

It doesn't happen when I am doing it manually.

Note that my config.fish is sourcing a venv python file in order to
have the correct depencies.

Do you have clue on how to make offpunk --sync run inside a cron job ?

-- 
Xavier Maillard (https://www.maillard.im)
Partagez votre super pouvoir! (https://dondesang.efs.sante.fr/)

GPG: 84C7 EF28 760F 49A7 D7C0  BFD7 141B AF53 291E 888D
Reply to thread Export thread (mbox)