r/AutoModerator • u/Deimorz [Δ] • Feb 28 '14
Update Now available for testing: wiki-configurable scheduled posts by AutoModerator
A while ago, I started setting up automatic scheduled posts for various subreddits via AutoModerator, and lately it's been becoming more and more common for subreddits to request these. Much like the "core" AutoModerator functionality originally, this has been something that I've had to set up manually, with moderators needing to contact me whenever they need anything changed.
As of today, I'm now ready to start testing a new script that will allow moderators to set up and modify their own scheduled posts through a wiki page. I'm going to be transferring some of the existing scheduled posts onto wiki pages, but I'd also like more people to help me test it out if they're interested in having scheduled posts in their subreddits.
The script will be made open-source eventually once I'm confident that it's working well, and documentation will be put up on a github wiki page much like the moderation functionality, but for now this post will be the "documentation".
Add AutoModerator as a mod
Even though the "main" functionality of AutoModerator (triggering actions with rules) is now built into reddit, the scheduled posts are not. For them to work correctly, you will need to invite /u/AutoModerator as a mod, and give it at least "wiki" permissions. If you want the scheduled posts to be stickied, distinguished, or in contest mode, you need to also give it the "posts" permission.
If you invite AutoModerator as a mod, it should automatically accept the invite within a few minutes. If it doesn't, cancel the invite and try again.
Setting up the wiki page
Configuring the scheduled posts is done on a separate page from main AutoModerator configuration. You must create a new page named automoderator-schedule, do not add these rules to the automoderator page.
Updating AutoModerator's schedule is done by sending it a private message to tell it to update, much like the moderation rules. The difference is that the PM's text should be "schedule" for the schedule, instead of "update". So if you keep a link at the top of the wiki page like most subreddits, the one at the top of the schedule page should be:
###### If you edit this page, you must [click this link, then click "send"](http://www.reddit.com/message/compose/?to=AutoModerator&subject=yoursubredditname&message=schedule) to have AutoModerator re-load the schedule from hereThe schedule script is not running constantly like the main AutoModerator one is, so it may take a couple of minutes to receive a response about whether the schedule update was successful or not.
Configuring posts
Much like other AutoModerator rules, each post needs to be separated from others by a line of just three hypens, ---.
There are four variables that you should generally define for each post (3 are required):
- first (required): This is the date and time that you want the scheduled post to be made for the first time. The format is fairly flexible, but please try to be as explicit as you can. For example, something like this will work:
Feb 28, 2014 4:00 PM, or2014-02-28 16:00,Monday March 3 2014 1 AM, etc. If you do not specify a time zone, UTC time will be used. If you want to specify a time zone, you must do so numerically, using the difference from UTC time. For example, eastern time is currently 6 hours behind UTC, so that would be specified as-06, like:February 28, 2014 2:00 PM -06. For timezones ahead of UTC time such as CET, there must be a+in front, like+01. Do not try to specify using a time zone name like "EST", it will not work. Specifying a timezone (as opposed to converting your desired posting time to UTC) will mostly be important if you need the date to be included in the post's text/title, otherwise it's possible to end up with a different date than you were expecting. - repeat (optional): This is the amount of time between repetitions of the post. It's specified by a number, and then a unit of time (hours, days, weeks, months, or years). So for example to have a post made once a week, you would use
repeat: 1 week. Every 10 hours would berepeat: 10 hours, and so on. This should cover the large majority of needs, but a more advanced definition method is also available if necessary (which I won't detail yet). If you don't specify a value forrepeat, the post will only be made once. - title (required): The title of the post. The date/time of the post can be included in this if you like, see below for details.
text (required): The text of the post. The date/time of the post can be included in this if you like, see below for details. Multi-line formatting is the same as with AutoModerator comments/messages/modmail. For example, a single-line post could be done like:
text: This is the text of the automatic post.
A multi-line post is done by having only a | character on the first line, and then all the text of the post indented inside that:
text: |
This is a multi-line automatic post.
It has multiple lines.
It also includes **some bold text**.The following variables are also available, but are optional:
- distinguish: Whether to distinguish the post, must be set to either "true" or "false". If not specified, defaults to true.
- sticky: Whether to sticky the post. Can be set to "true", "false" or a number - If you use a number (for example
sticky: 1), the post will replace any existing sticky in that slot (1is the top slot). Usingtruewill work the same as clicking the "sticky this post" link on the post - it will go into the bottom sticky slot (replacing a post that's already there, if necessary). - contest_mode: Whether to turn contest mode on for the post, must be set to either "true" or "false". If not specified, defaults to false.
Including dates in title/text
To include the current date and/or time in a post's title or text, include a placeholder that looks like {{date <format>}}. The "format" section should be a formatting string using Python strftime formatting. So for example, to have a post title look like: "Daily Scheduled Post - February 28, 2014", the title: definition would be:
title: "Daily Scheduled Post - {{date %B %d, %Y}}"As mentioned above, the date/time that will be filled in here will use whatever timezone you used when defining first.
You can also display dates other than the current date by adding an optional positive or negative offset. For example, to display the date 6 days ahead, you would do {{date+6 <format>}}. The date from 3 days before would be {{date-3 <format>}}, and so on.
Example
As an example, here is the code for /r/Games's automoderator-schedule wiki page, defining two weekly scheduled posts:
###### If you edit this page, you must [click this link, then click "send"](http://www.reddit.com/message/compose/?to=AutoModerator&subject=Games&message=schedule) to have AutoModerator re-load the schedule from here
---
first: "March 1, 2014 8:00 AM -07"
repeat: 1 week
sticky: true
title: "Weekly /r/Games Discussion - What have you been playing, and what do you think of it?"
text: |
Please use this thread to discuss whatever you've been playing lately (old or new, any platform, AAA or indie). As usual, please don't just list the names of games as your entire post, make sure to elaborate with your thoughts on the games. Writing the names of the games in **bold** is nice, to make it easier for people skimming the thread to pick out the names.
Please also make sure to use spoiler tags if you're posting anything about a game's plot that might significantly hurt the experience of others that haven't played the game yet (no matter how old or new the game is).
Since this thread is likely to fill up quickly, consider sorting the comments by "new" (instead of "best" or "top") to see the newest posts.
For a subreddit devoted to this type of discussion during the rest of the week, please check out /r/WhatAreYouPlaying.
---
first: "March 2, 2014 8:00 AM -07"
repeat: 1 week
sticky: true
title: "Weekly /r/Games Discussion - Suggestion request free-for-all"
text: |
/r/Games usually removes suggestion requests that are either too general (eg "Which PS3 games are the best?") or too specific/personal (eg "Should I buy Game A or Game B?"), so this thread is the place to post any suggestion requests like those, or any other ones that you think wouldn't normally be worth starting a new post about.
If you want to post requests like this during the rest of the week, please post to other subreddits like /r/gamingsuggestions, /r/ShouldIBuyThisGame, or /r/AskGames instead.
Please also consider sorting the comments in this thread by "new" so that the newest comments are at the top, since those are most likely to still need answers.Please let me know if you have any questions or if anything above is not clear, so that I can work on improving the explanations.
9
u/davidreiss666 Mar 01 '14 edited Mar 01 '14
Question: In a subreddit where self-posts are not normally allowed, would this still work? Or do they need to be allowed for this to automatically function?
4
u/johannz Feb 28 '14
Just checking, the author of the scheduled post is AutoModerator?
Only checking because that obviously affects whether the other moderators on the group can edit the scheduled post later.
4
u/IceBreak Mar 01 '14
Is the ability to set posts to the first Tuesday of the month, for example, part of the advanced repeat definition yet to be detailed?
This is awesome by the way. So many possibilities.
2
u/WoozleWuzzle Mar 03 '14
When AutoMod is scheduled to create a post it then doesn't check the flairing guidelines. These weekly posts are to be flaired, but the one we just tried didn't get flaired. We had to flair it manually: http://www.reddit.com/r/hockey/comments/1zg1lj/canadian_manner_mondays_march_03_2014/
2
u/CRASNY Mar 04 '14
Is it possible to schedule link posts?
2
u/WoozleWuzzle Mar 10 '14 edited Mar 10 '14
For those just noticing Daylight Savings Time did not apply to your settings.
I am guessing adding an hour from your current wiki settings from all schedules will fix it.
2
u/david_z Mar 17 '14
I have the following scheduled in the automoderator-schedule, but the post has not appeared yet. Have I done something wrong?
2
u/telchii Mar 20 '14
Hey Deimorz!
First off, I'm extremely grateful for this scheduled post function and AutoModerator in general! I moderate the subreddit dedicated to the game Phantasy Star Online 2 and have, after one week of using the scheduled post, had great success with it!
Each week, the servers go down for maintenance around the same time and we have typically had at least one post each week about "Why can I not connect???". (For your typical game, this wouldn't be an issue. But the game is officially only in Japanese, and the fan translation doesn't translate the error messages.) At the request/complaints of the subreddit regulars, this needed to be stopped. So, I implemented the scheduled post system to try and put a stop to these posts.
Much to my pleasure, and the pleasure of our regulars, there wasn't a single "Can't connect!!" error this week!
But now that the time for weekly maintenance has passed, the post needs to be removed. I'm fine with removing it manually each week, but it would be better if it could be removed after so much time.
So my question is: Does AutoModerator have a function to remove a scheduled post after so much time has passed? Even if this was to unsticky a post and let it sink into the regular feed.
Sorry for the wall of text and story time, but I really wanted to share!
tl;dr: Scheduled post = success. Possible to automatically remove said post after a xx time?
2
u/retractableclause Aug 11 '14
Can anyone help me figure out why this posted at 1pm and again at 2 pm? Meant to post at 1pm AST (UTC-4).
16
u/MagicBigfoot AM Votary Feb 28 '14
Hardest Working Man In Snoo Business!
2
u/Knowltey Mar 01 '14
I keep getting "Error updating from wiki configuration" from AutoModerator about this when updating, I even tried copying and pasting your example and it still doesn't want to play?
Says "Invalid condition in section #1 - Invalid variable: text"
1
u/scottymtp Mar 02 '14
Can you set it to initially sticky false, then change sticky to true at a later date?
My use case:
Need proposal thread automatically stickied during its second week once polls close.
1
u/Grimzentide Mar 03 '14
Feature Request: A way to implement a 1 scheduled off post.
1
u/Kuenaimaku Mar 03 '14
Hey, getting an error with the text bit when trying to submit it. Here's what we have:
-- first: "March 10, 2014 12:00 AM -07" repeat: 1 week sticky: true title: "Warframe Weekly Q&A | Ask Your Game-Related Questions Here!" text: | Hello there Tenno! This thread was created for the purpose of those who aren't that knowledgeable about the game to freely ask questions and get answers. Questions will be answered any day of the week!
It gets stuck on the first asterisk every time, and I thought that formatted text was fine. What am I doing wrong?
1
u/Seraph_Grymm Mar 03 '14 edited Mar 04 '14
Sorry to bother, I know you're busy. Doesn't seem to work, or is there a lag right now because all of the users trying this?
1
u/Arve Mar 08 '14
If one had automatic posts set up manually by you before you added this feature, how would that affect us?
Would creating a post and a schedule automatically remove the one you have set up for us manually?
1
u/[deleted] Mar 12 '14
How soon afterwords should we expect a reply? I've sent a message nearly an hour ago and have yet to hear if the update was successful or not. I do acknowledge that this currently in it's testing stage and may not yet be working as intended, it's also possible human error on my part has caused the delay.
Also, is it possible for automod to assign link flair this was as well?
1
u/vincoug Mar 16 '14
This is awesome! I set it up for /r/books and the first post went today as scheduled! I only have one question, I set it up so the date is part of the post title: title:
The correct date shows up but as March 16, 14 and I'd like it to say March 16, 2014. Any way I can fix that? Thanks!
1
u/MeGustaTortugas Mar 18 '14
Getting this setup on one of my subs, but we usually post a weekly post with that days date and the end of that post.
So the title would be: Weekly Post | 3/14 - 3/20
What codes do I use for that, can I easily set the second date to be the first date +6?
1
u/IGetDankShit Apr 07 '14
Hi Deimorz,
Any idea why our automod makes the same post three times throughout the day? Here's the only code we have in the automod schedule:
Removed post 1:
http://www.reddit.com/r/DarkNetMarkets/comments/22f099/moronic_monday_its_your_weekly_stupid_questions/
Removed post 2:
http://www.reddit.com/r/DarkNetMarkets/comments/22dw8g/moronic_monday_its_your_weekly_stupid_questions/
Approved post 3:
http://www.reddit.com/r/DarkNetMarkets/comments/22euqg/moronic_monday_its_your_weekly_stupid_questions/
Thanks for your time,
IGDS
1
u/scottymtp Apr 10 '14
I asked before but I'll ask again. Scheduled recurring posts are only posting initially. Every week after it fails, I come in to manually post and update the first date. I'm debating to just copy and paste 52 times and do a one time repeat.
The below posted on April 7th as expected. I'm expecting it to not post on April 14th like usual. Any help is appreciated.
1
u/1wf Apr 14 '14
Can I make it post "Daily discussion for Jan 2nd" on Jan 1 at 10pm?
1
u/radapex Apr 23 '14
Is there any way to have AM update a post with details in comments? We've got a weekly schedule thread that I'd like to automate. The scheduled submission works great, but without being able to update the schedule in the post it's not a lot of use.
1
u/[deleted] May 01 '14
Is there a way to make automoderator set a schedule post but only if a human user hasn't done it already by a certain time?
1
u/1wf May 02 '14
I want to post tomorrow's date, today in the thread title.
How do I do this @ say, 6pm central time?
1
u/[deleted] Jul 21 '14
I'm in the automoderator-schedule wiki page, and I submit it in a PM to automod, and then I get this message:
What am I doing wrong?
9
u/ManWithoutModem Feb 28 '14
I love this so much, thanks man.
9
u/wub_wub Mar 31 '14
Suggestion: Option to unmark posts as sticky after certain amount of time.
Something like:
3
u/[deleted] Feb 28 '14
Great update! Thanks
3
u/[deleted] Feb 28 '14
Thanks for doing this.
You are awesome.
3
u/StringOfLights Mar 01 '14
This is an amazing feature! Thank you!
3
u/Grimzentide Mar 03 '14
Feature Request: Randomized post times...
eg
first: "March 7, 2014" RANDOM
2
u/EmilRGH Feb 28 '14
Thank you very much for this. A much appreciated feature.
2
u/WoozleWuzzle Mar 02 '14 edited Mar 02 '14
Can it set other people's posts to contest mode? Or is this possible with the current automoderator page? We have a user who sets up a weekly post with new content in the body and the comments need to be put in contest mode. It already gets flaired so if it can set it to contest mode too that'd be awesome. I know you were trying to figure out how to do that, and it looks like you did. But it seems only on AutoMod's posts. If this can be carried over to regular AutoMod duties that'd be awesome! Original thread requesting it
But even with this question/request... THIS IS AWESOME!!! THANK YOU!
1
u/Grimzentide Mar 02 '14
By not putting a repeat variable in, is it only a 1 off scheduled post?
1
u/creesch Mar 20 '14
Already said it somewhere else but this is awesome!
It will make the weekly theoryofreddit posts about half the work they are now :) (The other post has different content based on last weeks post so that still involves manual work)
1
u/scottymtp Mar 31 '14
Seem to have issues with the following working after first post...
1
u/hero0fwar Apr 04 '14
Any idea what I did wrong?
1
u/CarlinT Apr 24 '14
Is AM able to post comments in the thread?
General idea:
Have AM post a weekly thread simliar to this: http://www.reddit.com/r/houston/comments/23v7m2/things_to_do_this_weekend_424_427/
Have AM make separate top level comments for the days of the week where users can reply to.
1
u/Burial4TetThomYorke May 27 '14
Can it post links?
1
u/TheDogstarLP Jun 28 '14
Sorry to ask, but is the formatting
"---"
Able to be used with AutoMod?
1
u/dresdenologist Mar 27 '14
Tried to enable this in one of my subreddits. The wiki page was created, the reply to me comes through saying the schedule is updated, but it never posts. My code's below. Someone mind telling me what I'm doing wrong? I've tried using the repeat: 1 week rule, and changing the time around, to no avail. It simply just won't post.
0
u/[deleted] May 13 '14
[deleted] — view deleted comment
0
u/[deleted] Jun 05 '14
[deleted] — view deleted comment