[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Poco Forums • View topic - How to run a filter only one day at week

How to run a filter only one day at week

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

How to run a filter only one day at week

Postby ferent » Sun Jan 07, 2007 8:45 pm

I want to run a filter only the mondays.

Do you think it´s posible to do that?
Alfredo Fernandez
ferent
Resident Poster
 
Posts: 188
Joined: Sun Jan 30, 2005 7:29 am
Location: Spain

Re: How to run a filter only one day at week

Postby blakelyg » Sun Jan 07, 2007 9:03 pm

ferent wrote:I want to run a filter only the mondays.

Do you think it´s posible to do that?


Would this not be possible using the timed event (Tools-->event)?

Haven't tried it (not home right now), but that may work.

GB
blakelyg
Resident Poster
 
Posts: 167
Joined: Sun Jul 25, 2004 10:13 pm
Location: Laval Quebec

Postby ferent » Sun Jan 07, 2007 9:25 pm

I will test it! thanks
Alfredo Fernandez
ferent
Resident Poster
 
Posts: 188
Joined: Sun Jan 30, 2005 7:29 am
Location: Spain

Postby Michael » Fri Mar 16, 2007 3:06 am

I'm just back from a two month vacation in New Zealand. I did not use Poco at all during that time so the information below may not be totally accurate, it is based on my recollection.

Unfortuately timed events fire on start up as well as at the specified interval. I also believe that they are run every interval there after. This means that if you had an event to run every 7 days then it would run each day you started Poco and then every 7 days there after rather than on a specific day of the week.

My suggested work around for this is to use a timed event that runs daily. The event should launch a script whose first task is to check to see when it last run. If the script hadn't run since the last due date and it wasn't the right day of the week then you would have to decide whether or not to run it. If the script had been run on the last due date then it should only be run if the next due date. You would also have to decide what to do for the next run if a due date was missed (e.g., if the script had been set to run last Friday but wasn't run until Sunday - would you want it run again today or would you want to delay running it until Sunday).
Michael
Moderator
 
Posts: 866
Joined: Mon Jul 26, 2004 12:14 pm
Location: Victoria BC, Canada

Postby tribble » Fri Mar 16, 2007 12:28 pm

I'm not an expert here...

Using the Timed events [OnEvent] appears to allow me to set a start date. So, if I started today, and said to run every 7 days, isn't that 7 days calculated from when I told it to start and not just 7 days from the random time I started Poco/Barca?
tribble
Poco Enthusiast
 
Posts: 430
Joined: Wed Jul 28, 2004 8:55 am

Postby Michael » Tue Mar 20, 2007 3:02 pm

I haven't tried this by setting a start date. I do know that when I didn't I would get the script running every time I started Barca/Poco.
Michael
Moderator
 
Posts: 866
Joined: Mon Jul 26, 2004 12:14 pm
Location: Victoria BC, Canada


Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 2 guests

cron