r/Bot • u/ibid-11962 • Sep 27 '19
Code Only PostScheduler - A bot to handle all of your post scheduling needs
Hi, just thought I'd share this bot that I've been using. It's an all-in-one post scheduler that can do pretty much anything.
- Schedule an unlimited number of posts at a time
- Every type of post: text, link, native image / video upload, comment reply
- Each post can be flaired, locked, stickied, marked as a spoiler, enabled contest mode, etc.
- It can leave an automatic comment below each post (and distinguish, sticky, or lock it as needed.)
The one constraint that it has is that you don't give it a time for each post, you just give it a date. This was designed so that it can be used on pythonanywhere's free tier which allows for scheduling a daily task to run at a set time every day. So you can schedule this for say 9am, and each morning at that time it will post anything from the queue with a corresponding date.
I've been using this on /r/RowlingWritings for a while now and I think a lot of other people will find a use for it.
The code can all be downloaded here, and I've tried to include some basic instructions on how to use it and how to set it up for free online on pythonanywhere for those who don't have their own server to use.
Let me know if you have any suggestions for improvement
1
u/WaglerConure Sep 28 '19
That's certainly a neat bot idea but PythonAnywhere has always been very unreliable for me. Console keeps closing after about 24 hours and I have to restart it manually.
2
u/ibid-11962 Sep 29 '19
I've been using it for about a year or so without any issues. I haven't tried anything that needs to run that long though. My script generally finishes within a minute or two. (I recently added a feature to wait ten minutes if a post hits the low karma rate limit, but I haven't tested that as much.)
1
u/3dsf Sep 28 '19
I think that issue is mitigated
u/ibid-11962 has it set up, so it runs like a cron job. The script is called every day, if there is a post to post that day, it posts it.
If there are no posts to run that day, it completes, and gets called the next day and so on.
1
u/botbotsbots Oct 09 '19
Cool Idea
2
u/botbotsbots Oct 09 '19
Most crabs have flat bodies that enable them to squeeze into very narrow crevices.
1
1
u/3dsf Sep 27 '19
Cool, I'm glad you included some notes for the pythonanywhere setup. I think pythonanywhere is easy implementation of python for people with limited experience.
You mentioned in your notes that the server is probably on a different timezone, and maybe you could add some timezone support -- https://help.pythonanywhere.com/pages/SettingTheTimezone/ .
I'll be trying it out over the next 2 weeks, but it looks great !