[development] run cron + post tweet

Carl Wiedemann carl.wiedemann at gmail.com
Fri May 20 13:24:08 UTC 2011


Any reason you're not using http://drupal.org/project/twitter ?

On Fri, May 20, 2011 at 8:13 AM, Jamie Holly <hovercrafter at earthlink.net>wrote:

>  Did you clear your cache after creating your hook_cron (in D7)?
>
> When writing modules that utilize hook_cron, I always find it easier to add
> a temporary menu path to the hook_cron (or even a hook_init) just to test it
> out. Just remember to remove that once you are done developing & testing.
>
> Jamie Hollyhttp://www.intoxination.net http://www.hollyit.net
>
>
> On 5/20/2011 6:27 AM, NubianNattySeydi wrote:
>
> Hi I am a newbie in drupal module developement, I have my website
> http://seydinet.com made with Managing News and now I just want create a
> module who if I run my cron post automaticly a tweet with a message telling
> for exemple "4news item added in seydinet.com"
> So I create a module directory name seydi, I add both file seydi.info and
> seydi.module. I have no problem with editing seydi.info but the big deal
> is with seydi.module.
> I start by implementing hook_cron() then I have to implement the code who
> gonna post the tweet and I dont know how to do that
> Here is the begining of my code
>
>  <?php
>  /*
> implementation de hook_cron
> */
>
>  function seydi_cron(){
>  //watchdog('seydi', 'my module just add something in cron', array(),
> WATCHDOG_DEBUG);
>  // db stuff
>  if (date('G', time()) == '19'){
>  //tweet
>  }
> }
>
>  Thanks
>
> --
> Seydina Mouhamadou Ndiaye dit "Nattyseydi"
> Administrateur Réseaux
> Montage Vidéos, Etudiant en Java,
> Membres de DakarLug, Gtug-dakar
> Tel por: 77-512-35-00, fixe: 33-824-80-80
> http://nattyseydi.blogspot.com
> http://twitter.com/NattySeydi
> http://www.facebook.com/nattyseydi
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20110520/354210f0/attachment.html 


More information about the development mailing list