organize icon indicating copy to clipboard operation
organize copied to clipboard

organize on cron

Open ersil opened this issue 4 years ago • 5 comments
trafficstars

I am having trouble running organize in a crontab. The cron job logs out Nothing to do, while organize sim gives an output. Does this rely on any env var magic? All the config folders are in absolute path.

Crontab -l output

*/5 * * * * /Users/ersils/opt/anaconda3/bin/organize run --config-file='/Users/ersils/Library/Application Support/organize/config.yaml'>/tmp/stdout.log 2>/tmp/stderr.log.

MacOS Big Sur 11.2.3 This exact command works fine outside.

ersil avatar Mar 26 '21 21:03 ersil

No env var magic. Can you post your config?

Am 26.03.2021 um 22:16 schrieb ersil @.***>:

 I am having trouble running organize in a crontab. The cron job logs out Nothing to do, while organize sim gives an output. Does this rely on any env var magic?

Crontab -l output

*/5 * * * * /Users/ersils/opt/anaconda3/bin/organize run --config-file='/Users/ersils/Library/Application Support/organize/config.yaml'>/tmp/stdout.log 2>/tmp/stderr.log.

MacOS Big Sur 11.2.3 This exact command works fine outside.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

tfeldmann avatar Mar 26 '21 21:03 tfeldmann

rules:

move screenshots into "Screenshots" folder

  • folders: /Users/ersils//Desktop filters:
    • filename: startswith: 'Screenshot' actions:
    • move: /Users/ersils//Desktop/Screenshots/

move Screenshots older > 15 days into the trash

  • folders: /Users/ersils/Desktop/Screenshots/ filters:
    • filename: startswith: 'Screenshot'
    • lastmodified: days: 15 mode: older actions:
    • delete

move named into Google drive folder

  • folders:
    • '/Users/ersils//Desktop/*.png'
    • '! /Users/ersils//Desktop/Screenshot*.png' actions:
      • move: '/Volumes/GoogleDrive/My Drive/Shared SCs/'

ersil avatar Mar 26 '21 21:03 ersil

Currently I care only about the Google Drive one.

ersil avatar Mar 26 '21 21:03 ersil

@tfeldmann any ideas why this could happen?

ersil avatar Mar 30 '21 03:03 ersil

The problem here seems to be the security settings on newer MacOS versions. I hit the same problem as you @ersil, and fixed it by allowing /sbin/cron full disk access, as per this article: https://osxdaily.com/2020/04/27/fix-cron-permissions-macos-full-disk-access/

Hope it helps. I was few minutes away from diving in making launchd job :)

marikgoran avatar Jun 20 '21 02:06 marikgoran