[GH-ISSUE #1351] Question: how to remove a particular entry from archivebox scheduling list? #2336

Closed
opened 2026-03-01 17:58:17 +03:00 by kerem · 2 comments
Owner

Originally created by @hacback17 on GitHub (Feb 19, 2024).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1351

I am a first time user of ArchiveBox, and I have added multiple entries in my ArchiveBox Scheduler. Later I realised that I want to remove one particular entry from the scheduler. How can I do it?

Originally created by @hacback17 on GitHub (Feb 19, 2024). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1351 I am a first time user of ArchiveBox, and I have added multiple entries in my ArchiveBox Scheduler. Later I realised that I want to remove one particular entry from the scheduler. How can I do it?
kerem closed this issue 2026-03-01 17:58:17 +03:00
Author
Owner

@pirate commented on GitHub (Feb 19, 2024):

We don't have a native way to remove an individual entry from the CLI at the moment, it's a tricky problem because the file can be in a few different formats, can be edited directly by users and other programs, and not all the scheduler running methods are stateful (e.g. --foreground doesn't store a crontab at all).

Here are some options to accomplish what you need though:


Option 1. locate the crontab file for you user and remove individual lines from there

We use python-crontab internally to create scheduled jobs (which in-turn uses UNIX's crontab system with a crontab file for your user). https://pypi.org/project/python-crontab/

from crontab import CronTab

>>> c = CronTab(user=True)
>>> c.tabfile
>>> ... figure out where your crontab file is located by exploring more attrs on this object

Then edit/remove individual lines from that file, e.g. /var/spool/cron/crontabs/username


Option 2. Clear the whole list and add back entries manually

# backup the list of schedule jobs to a file somewhere
archivebox schedule --show > ~/Desktop/schedule_backup.txt

# clear the whole list of scheduled jobs registered in the crontab
archivebox schedule --clear

# then add back in the ones you want manually from ~/Desktop/schedule_backup.txt
archivebox schedule --add ...
<!-- gh-comment-id:1951647933 --> @pirate commented on GitHub (Feb 19, 2024): We don't have a native way to remove an individual entry from the CLI at the moment, it's a tricky problem because the file can be in a few different formats, can be edited directly by users and other programs, and not all the scheduler running methods are stateful (e.g. `--foreground` doesn't store a crontab at all). Here are some options to accomplish what you need though: --- ### Option 1. locate the crontab file for you user and remove individual lines from there We use `python-crontab` internally to create scheduled jobs (which in-turn uses UNIX's crontab system with a crontab file for your user). https://pypi.org/project/python-crontab/ ```python from crontab import CronTab >>> c = CronTab(user=True) >>> c.tabfile >>> ... figure out where your crontab file is located by exploring more attrs on this object ``` Then edit/remove individual lines from that file, e.g. `/var/spool/cron/crontabs/username` --- ### Option 2. Clear the whole list and add back entries manually ```bash # backup the list of schedule jobs to a file somewhere archivebox schedule --show > ~/Desktop/schedule_backup.txt # clear the whole list of scheduled jobs registered in the crontab archivebox schedule --clear # then add back in the ones you want manually from ~/Desktop/schedule_backup.txt archivebox schedule --add ... ```
Author
Owner

@hacback17 commented on GitHub (Feb 20, 2024):

Thank you for the guidance. it was very helpful.

<!-- gh-comment-id:1953533262 --> @hacback17 commented on GitHub (Feb 20, 2024): Thank you for the guidance. it was very helpful.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#2336
No description provided.