I assume that you are getting these times from somewhere, hopefully a website. To do as Steve says, you would just scrape (or use the API if there is one) to get the times, and schedule a tweet at that time. If you do use cron you can make use of https://pypi.python.org/pypi/python-crontab
On 15 April 2013 10:23, Zaki Akhmad <[email protected]> wrote: > On Mon, Apr 15, 2013 at 3:51 PM, Alan Gauld <[email protected]> > wrote: > > > multiple cron jobs will be less work for your computer than running a > long > > term program constantly checking times and launching your scripts... > That's > > called reinventing the wheel with a square one... > > > > There are more modern (and more efficent) replacements for cron but given > > your requirements cron still looks like the best bet. > > Actually, > > I want to write a twitter bot which runs on a specific time. For an > idea, I'd like to have this twitter bot tweet every sunrise and > sunset, everyday. Since everyday the sunrise and the sunset time are > vary, what are the best way to do it? > > Should I entered the sunset and the sunrise manually? > > Thanks! > -- > Zaki Akhmad > _______________________________________________ > Tutor maillist - [email protected] > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > -- ./Sven
_______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
