The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
When does "nextrun" field update from SQL table cron?
Hello everyone, I was wondering if anyone knew when is the field "nextrun" in the SQL table cron updated? Here's my situation:
I have a SQL update query that I runs in a cron file that I setup to run every week. In that SQL query I need to specify the date of the next time this cron will run. If use the field "nextrun" from the table cron within this cron job will the date be the next already or the current one of that day still? Basically what I am asking is if the cron is being executed will the nextrun time be already updated for next run If I call that field from within the cron file and use it in a query? I know it's a bit confusing but If anyone has any info please let me know. Thank you for your time. Regards. |
#2
|
|||
|
|||
If you have the task set up to run once a week on a given day and time, once the scheduled task runs it will automatically update itself to run the next week on the same day and time. There's no need to update the schedule manually in your code.
If you run the task manually, it does not affect the next scheduled run day/time. |
#3
|
|||
|
|||
Quote:
Another solution to this would be just to use this to set the next event (same time as "nextrun") PHP Code:
|
#4
|
|||
|
|||
I see...
I do believe the nextrun is calculated after the run is complete. I could be wrong. The easiest way to check it is to run your task and see what nextrun says before it completes. |
#5
|
|||
|
|||
Quote:
|
#6
|
|||
|
|||
Quote:
Quote:
--------------- Added [DATE]1313719820[/DATE] at [TIME]1313719820[/TIME] --------------- OK guys got it working better than I had hoped I used the previous code in my cron file and waited for the task to run. Had to make some posts throughout the night to make the forum "active" so the task would run and when it did at first with the code mentioned before : PHP Code:
PHP Code:
There's some other aspects to work out but the initial issue of this thread is SOLVED my friends. Thanks for your help again, your help has been incredibly helpful for my learning process. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|