Hi,
I did a search and haven't been able to find an answer.
Can I set up a cron job to run every 5mins, but only between midnight and 2am every day?
I think the answer is no.
I need to run a script once a day, but it takes more than 30 seconds to run and dies before it finishes. The script fetches a number of rss feeds, does some processing on them and inserts some info into a database.
I've changed the script to process only a few feeds each time it runs, but it means I need to run the script about 23 times to process all the feeds.
I need all of the info as early in the day as possible. I could run the script/cronjob every hour, but that means that some of the feeds won't be processed until later in the day, making them useless.
If I run the cronjob every 5 mins then all the feeds will be processed nice and early in the day, but I'll be inundated with 288 confirmation emails a day, because the cronjob will keep running even though there aren't any feeds for it to process.
Any thoughts or questions?
Cheers,
Richard
I did a search and haven't been able to find an answer.
Can I set up a cron job to run every 5mins, but only between midnight and 2am every day?
I think the answer is no.
I need to run a script once a day, but it takes more than 30 seconds to run and dies before it finishes. The script fetches a number of rss feeds, does some processing on them and inserts some info into a database.
I've changed the script to process only a few feeds each time it runs, but it means I need to run the script about 23 times to process all the feeds.
I need all of the info as early in the day as possible. I could run the script/cronjob every hour, but that means that some of the feeds won't be processed until later in the day, making them useless.
If I run the cronjob every 5 mins then all the feeds will be processed nice and early in the day, but I'll be inundated with 288 confirmation emails a day, because the cronjob will keep running even though there aren't any feeds for it to process.
Any thoughts or questions?
Cheers,
Richard
















