Services: Schedule code execution #40
Labels
No labels
bug
confirmed
critical
database
discussion
documentation
email-support
enhancement
feature
suggestion
support
warlock
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference: hazaar/hazaar-mvc-old#40
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is a quick idea that I had to help make services a bit more useful.
Right now they can be used to either loop through the Service::run() method continuously or subscribe to events that execute a method when the event is triggered.
What I would like to do is add some functions that allow methods to be called at certain times.
For example, in the services init() method you could call something like:
This will call the method only once in 60 seconds from now.
Or:
These will call the method at 5pm today then next friday at 2pm. This can use the \Hazaar\Date() object (and in turn the strtotime() function) to convert text to a date.
Or we can use the cron format, such as:
The method myTestMethod will execute at 5pm Mondays through Fridays.
Status changed to closed by commit 2b7edc
mentioned in issue #28
mentioned in commit
2b7edcc4a9