[support] run cron + post tweet

Seydi ndiaye seydina at seydinet.com
Fri May 20 13:14:30 UTC 2011


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
Web Developper (drupal, java)
Open Source Advocate
http://seydinet.com
<http://seydinet.com/>http://twitter.com/NattySeydi<http://twitter.com/#%21/NattySeydi>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110520/50306fd9/attachment.html 


More information about the support mailing list