I want to implement the schedule tweet feature as similar to hootsuite or buffer.
The way I have designed my current architecture is - a cron job runs every minute, which evokes a shell script, which fires a python/django command to see if there is any scheduled tweet in the database for current time. If yes, make an API call to twitter.
Is there a better way of doing it?
可以使用django-celery安排相同的过程
It's hard to define what's "better" way of doing it since it depends on implementation/problem.
For simple implementations I would go the same route you went, that is cron. If that's OK with you, ie there are no other problems you want to avoid I would advise sticking with it.
If you have need for something else you can for example:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.