Updating with a cron job

Help
Jeff Day
2005-02-04
2013-04-09
  • Jeff Day

    Jeff Day - 2005-02-04

    I've never really tried messing with cron jobs before, but I would like to have a cron job running to post stuff from refeed into my MT reblog.  Could anyone recommend a tutorial or do me one better and tell me how it should be done?

     
    • Michal Migurski

      Michal Migurski - 2005-02-04

      It's really easy.

      1) To edit your cron file, use the command `crontab -e`. See http://www.hmug.org/man/1/crontab.html for details on the crontab program.
      2) Enter a line such as `0 * * * * /usr/bin/GET http://example.com/your/reblog/update-quiet.php\`, which means "run this program at the top of every hour." See http://www.hmug.org/man/5/crontab.html for more info on this format.

      That's it. Of course, it depends on the location of "GET" on your server, or whether you'd prefer to use other HTTP clients like curl or wget.

       
    • DCohen

      DCohen - 2005-02-04

      Yes, but how can you then set it up to automatically reblog the updates?

       
      • Michael Frumin

        Michael Frumin - 2005-02-04

        get the new distribution from reblog.org

        in the reBlog/mt directory, there is now a script called reblog_import.pl

        copy that into your Movable Type directory, change the settings in the top of the script (i.e. which blog, which author), and then it should be good to go.

        thanks,
        mike

         
    • DCohen

      DCohen - 2005-02-04

      Thanks Mike, doesn't help for us Wordpress users, I'll take a look at the code and see how portable it is.  Is there a Wordpress solution in the works?

       
      • Michael Frumin

        Michael Frumin - 2005-02-04

        dunno.  migurski?

        movable type has the nice feature of exporting all its functionality into objects that can be called just as easily from a new little script as from the web.  how's WP for that?

        I'm guessing that more likely you'll want to sign into WP, save your cookies to a file, then do a wget cron job that uses the saved cookie file.

         
        • Michal Migurski

          Michal Migurski - 2005-02-04

          WP is a horking mess.

          But I will see what can be done, without the usually-required client authentication for administrative functions.

           
    • DCohen

      DCohen - 2005-02-04

      I don't see why you couldn't use the plugin model and extend reBlog.php to call into it to do all the magic.

       
    • Nobody/Anonymous

      i downloaded the new distrib and there's no reblog_import.pl ? am i missing something?

       
    • Nobody/Anonymous

      there's no reblog_import.pl in the new distrib? am i missing something?

       
    • Nobody/Anonymous

      Any update on a cron job for word press?

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks