<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Did you clear your cache after creating your hook_cron (in D7)?<br>
<br>
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.<br>
<pre class="moz-signature" cols="72">Jamie Holly
<a class="moz-txt-link-freetext" href="http://www.intoxination.net">http://www.intoxination.net</a>
<a class="moz-txt-link-freetext" href="http://www.hollyit.net">http://www.hollyit.net</a></pre>
<br>
On 5/20/2011 6:27 AM, NubianNattySeydi wrote:
<blockquote
cite="mid:BANLkTinzPoi5ud3x90154Rc-Ke=5kX=HoQ@mail.gmail.com"
type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
Hi I am a newbie in drupal module developement, I have my website <a
moz-do-not-send="true" href="http://seydinet.com/">http://seydinet.com</a> 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 <a moz-do-not-send="true"
href="http://seydinet.com">seydinet.com</a>"
<div>
So I create a module directory name seydi, I add both file <a
moz-do-not-send="true" href="http://seydi.info">seydi.info</a>
and seydi.module. I have no problem with editing <a
moz-do-not-send="true" href="http://seydi.info">seydi.info</a>
but the big deal is with seydi.module.</div>
<div>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</div>
<div>Here is the begining of my code</div>
<div><br>
</div>
<div>
<div><?php</div>
<div>
/*</div>
<div>implementation de hook_cron</div>
<div>*/</div>
<div><br>
</div>
<div>function seydi_cron(){</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>//watchdog('seydi',
'my module just add something in cron', array(),
WATCHDOG_DEBUG);</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>//
db stuff</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>if
(date('G', time()) == '19'){</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>//tweet</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span></div>
<div>}</div>
<div>}</div>
<div><br>
</div>
Thanks</div>
<br>
-- <br>
<span style="font-family: arial,sans-serif; font-size: 12px;">Seydina
Mouhamadou Ndiaye dit "Nattyseydi" <br>
Administrateur Réseaux </span>
<div><span style="font-family: arial,sans-serif; font-size: 12px;">Montage
Vidéos, Etudiant en Java, </span></div>
<div><span style="font-family: arial,sans-serif; font-size: 12px;">Membres
de DakarLug, Gtug-dakar <br>
Tel por: 77-512-35-00, fixe: 33-824-80-80 </span></div>
<div><span style="font-family: arial,sans-serif; font-size: 12px;"><a
moz-do-not-send="true" href="http://nattyseydi.blogspot.com"
target="_blank">http://nattyseydi.blogspot.com</a></span></div>
<div><a moz-do-not-send="true"
href="http://twitter.com/NattySeydi" target="_blank">http://twitter.com/NattySeydi</a></div>
<div><a moz-do-not-send="true"
href="http://www.facebook.com/nattyseydi" target="_blank">http://www.facebook.com/nattyseydi</a></div>
<div style="text-align: left;">
<font size="3" face="'lucida grande', tahoma, verdana, arial,
sans-serif"><span style="border-collapse: collapse; font-size:
11px; line-height: 16px;"><br>
</span></font></div>
<div><font size="3" color="#666666" face="'Lucida Grande',
sans-serif"><span style="font-size: 11px; line-height: 16px;"><br>
</span></font></div>
<br>
</blockquote>
</body>
</html>