Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2011
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. take current date and
  2.  
  3. set its seconds to zero
  4. set milliseconds to zero
  5. increase minutes by one
  6.  
  7. for some number of tires to not loop forever
  8. if month matches the month pattern
  9. while that month doesn't change
  10. if weekday matches the weekday pattern or day of month matches the day of month pattern
  11. while day of month doesn't change
  12. if hour of day maches the hour of day pattern
  13. while hour of day doesn't change
  14. if minutes matches the minutes pattern
  15. yield cron hour
  16. else
  17. increase minutes by one
  18. else
  19. set minutes to zero
  20. increase hour of day by one
  21. else
  22. set hour of day to zero
  23. set minutes to zero
  24. increase day of month by one
  25. else
  26. set day of month to one
  27. set hour of day to zero
  28. set minutes to zero
  29. increase month by one
  30. increase counter of tries by one
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement