PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun Jun 07, 2020 3:48 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Crontab
PostPosted: Mon May 04, 2009 4:43 pm 
Offline
Forum Newbie

Joined: Wed Apr 22, 2009 2:37 pm
Posts: 7
I used Crontab to execute my php file daily, I have some problem that the crontab does not do. In the php file there is many category and in browser if I choose example localhost/web/file.php?category=type1 the process is done correctly. But in the crontab, the file is processed but the category is not. Anybody have similar experience? or is it just not possible??

Thanks.


Top
 Profile  
 
 Post subject: Re: Crontab
PostPosted: Tue May 05, 2009 6:45 am 
Offline
Forum Newbie

Joined: Wed Apr 22, 2009 4:23 am
Posts: 6
Hi,

The crontab functionality is of course heavily inspired by UNIX' crontab. This means that you can schedule jobs with it. You specify when it must run by a string like: "*/3 5-23 * * *" which means every three minutes, but not during the night, or "0 7 * * *" which means every day at 7 am. You specify what must be run by the class-name of a class implementing 'Runnable', or optionally, implementing the specialized interface CronJob. The CronJob interface extends Runnable but also alows for code to be run when the con-daemon stops or when it starts (a String can be provided for configuration). You must implement such a class and put the class-file e.g. in WEB-INF/classes.
In combination with the 'ClassSecurity' feature you can easily implement CronJobs using the bridge interfaces, so you might want to privilege your class in <mmbase-config>security/classauthentication.xml.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group