Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Running job from cron deletes all items from caldav #140

Open
tjex opened this issue Dec 14, 2024 · 0 comments
Open

[BUG] Running job from cron deletes all items from caldav #140

tjex opened this issue Dec 14, 2024 · 0 comments
Labels

Comments

@tjex
Copy link

tjex commented Dec 14, 2024

Describe the bug

I have the simplest syncall command, that I run to just sync one project:

${XDG_DATA_HOME}/miniconda3/bin/tw_caldav_sync \
    --caldav-calendar inbox \
    --caldav-url https://dav.mailbox.org/caldav \
    --caldav-user <email> \
    --caldav-passwd-cmd "gopass show -o email/<email>" \
    -p inbox \
    -s mobile

Running this from the terminal works fine.
Running from a cron job deletes the tasks on the server side.

I've tested that cron is executing gopass and is finding environment variables correctly.
syncall is successfully pushing to the server in any case.

The problem is that tasks are being deleted.

Additionally, running from cron creates a completed.data and pending.data directory in my taskwarrior data dir.

To Reproduce

Steps to reproduce the behavior:

Create script as per the below example:

#!/usr/bin/env bash

${XDG_DATA_HOME}/miniconda3/bin/tw_caldav_sync \
    --caldav-calendar inbox \
    --caldav-url https://dav.mailbox.org/caldav \
    --caldav-user <email> \
    --caldav-passwd-cmd "gopass show -o email/<email>" \
    -p inbox \
    -s mobile

crontab -e:

* * * * * . ~/.zprofile; . ~/.config/shell/paths; ~/scripts/progs/tw-sync-tasks.sh > ~/cronout

Expected Behavior

The tasks get synced in their current state (completed, pending, deleted), instead of all being deleted on the server side.

Versions

OS Version (cat /etc/*-release; uname -a)

Fedora Asahi Remix release 40 (Forty)
NAME="Fedora Linux Asahi Remix"
VERSION="40 (Forty)"
ID=fedora-asahi-remix
ID_LIKE=fedora
VERSION_ID=40
VERSION_CODENAME=""
PLATFORM_ID="platform:f40"
PRETTY_NAME="Fedora Linux Asahi Remix 40 (Forty)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora-asahi-remix:40"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedora-asahi-remix.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f40/system-administrators-guide/"
SUPPORT_URL="https://discussion.fedoraproject.org/c/neighbors/asahi/asahi-help/94"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=40
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=40
Fedora Asahi Remix release 40 (Forty)
Fedora Asahi Remix release 40 (Forty)
Linux lappy 6.11.8-400.asahi.fc40.aarch64+16k #1 SMP PREEMPT_DYNAMIC Sat Nov 16 21:59:53 UTC 2024 aarch64 GNU/Linux

Python version (python --version; python3 --version)

Python 3.12.7
Python 3.12.7

--version of your executable

tw_caldav_sync, version <module 'syncall.__version__' from '/home/tjex/.local/share/venv/0/lib64/python3.12/site-packages/syncall/__version__.py'>
@tjex tjex added the bug label Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant