Continuity: a drop-in replacement for the AutoModerator schedule on Reddit

https://www.reddit.com/r/redditdev/comments/jl4kkk/continuity_a_dropin_replacement_for_the/

created by dequeued on 30/10/2020 at 20:28 UTC

23 upvotes, 1 top-level comments (showing 1)

Continuity

Continuity is a replacement for the AutoModerator schedule on Reddit. Continuity runs as a command line script and the easiest way to set it up is as an hourly cron job.

Who should use this script?

If your subreddit has a simple schedule, you should use the native scheduled and recurring posts feature[1] that has been announced on /r/modnews[2]. It works well, it's supported by Reddit, and it meets the needs of most subreddits.

1: https://mods.reddithelp.com/hc/en-us/articles/360037199532

2: https://www.reddit.com/r/modnews/search?q=title%3Aposts+%28scheduled+OR+recurring%29+author%3A%280perspective+OR+AutoModerator%29&restrict_sr=on&sort=new&t=all#res-hide-options

If nobody on your moderation team is familiar with running Reddit bots on a Linux server, run away!

However, if you have bot experience and want to maintain a complex schedule in a wiki page, need `rrule` support, or want to write code to further customize how scheduled posts are made then this script may be helpful to you.

Features

Setup

Python packages

Requires praw, PyYAML, python-dateutil, and regex.

3: https://www.reddit.com/r/AutoModerator/comments/1z7rlu/now_available_for_testing_wikiconfigurable/

Notes

If you want to leave the wiki page in the same location as AutoModerator, make sure you disable AutoModerator by saving an empty configuration and sending /u/AutoModerator a private message to tell it to update (this may require a large number of attempts). After AutoModerator has sent an acknowledgement, you can restore your working configuration.

Examples

Dry-run test

$ continuity.py --brief --dry-run --start=20201201T000000Z --end=20210101T000000Z mybotname automoderator-schedule mysubreddit
2020-10-11T05:16:31 | INFO | submit_queue | 2020-12-04T17:00:00-04:00: Weekend Discussion and Victory Thread for the week of December 04, 2020
2020-10-11T05:16:32 | INFO | submit_queue | 2020-12-07T07:00:00-04:00: Weekday Help and Victory Thread for the week of December 07, 2020
2020-10-11T05:16:33 | INFO | submit_queue | 2020-12-11T17:00:00-04:00: Weekend Discussion and Victory Thread for the week of December 11, 2020
2020-10-11T05:16:33 | INFO | submit_queue | 2020-12-14T07:00:00-04:00: Weekday Help and Victory Thread for the week of December 14, 2020
2020-10-11T05:16:34 | INFO | submit_queue | 2020-12-18T17:00:00-04:00: Weekend Discussion and Victory Thread for the week of December 18, 2020
2020-10-11T05:16:34 | INFO | submit_queue | 2020-12-21T07:00:00-04:00: Weekday Help and Victory Thread for the week of December 21, 2020
2020-10-11T05:16:35 | INFO | submit_queue | 2020-12-25T17:00:00-04:00: Weekend Discussion and Victory Thread for the week of December 25, 2020
2020-10-11T05:16:36 | INFO | submit_queue | 2020-12-27T09:00:00-04:00: What are your 2021 financial goals?
2020-10-11T05:16:36 | INFO | submit_queue | 2020-12-28T07:00:00-04:00: Weekday Help and Victory Thread for the week of December 28, 2020

Linux cron job configuration

@hourly /home/myusername/scripts/continuity.py mybotname automoderator-schedule mysubreddit

GitHub repository

https://github.com/dequeued0/continuity

Comments

Comment by itskdog at 31/10/2020 at 09:31 UTC

1 upvotes, 0 direct replies

If you haven’t already, you might want to crosspost to r/modhelp / r/modsupport and r/bot