Cron at certain times
jamestamr - July 14, 2008 - 14:22
Is it possible to set certain items to only be run during cron at a certain time.
For example,
If you wanted to run cron for search and log clearing every hour or so but only wanted an automated csv email of all new users once a day at a certain time, is this possible?
I would rather create the module within Drupal, otherwise I will end up having to create some bespoke PHP files to lookup the databases and get the data needed and leave that cron out of Drupal.
Using Drupal 5.8.

No problem...
If you're writing a module to do this you can check the current time in the modules
function mymodulename.cronand proceed accordingly...Pete.
Thanks,
I hadn't thought of that, I thought there would be some option to do it automatically within Drupal.
James T
Action Medical Research - www.action.org.uk
You might also want to check
You might also want to check out CronPlus which allows modules to add hourly, daily, weekly, monthly, and yearly cron hooks.
Thanks for that, will have a
Thanks for that, will have a look.
James T
Action Medical Research - www.action.org.uk
Elysia cron
Elysia cron let's you run cron jobs on a "crontab like" scheduling.
For example you can run a job every day at 0:00 with a rule like this:
"0 0 * * *"
Or run a job every 2 hours with this rule:
"0 */2 * * *"
Check Due Date Field
How do you check periodically (perhaps with cron jobs, rules, or in general) whether a CCK field which contains a date value (M-D-Y) has passed? Currently, I have created a content type with field that asks users to enter in a due date for when they want a project to be completed by. Several nodes are generated of this content type that contains this "due date" field.
I would like to check once a day whether the due date has been passed (check it against the current date) and send an e-mail to the set of users working on the project. I was hoping to use the rules scheduler but in many ways, it seems to be tied to triggered rules, meaning it can only be invoked when a certain event occurs, which doesnt happen for my set of users if they forget about a project.
I've tried looking around google and the forums without any luck, but maybe someone can point me in the right direction.
I appreciate it.
Thanks
_
Could you trigger an event when cron is run? I did that with workflow_ng, then called some code to check the time of day and do the date checking at 4am.
Pete.