SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2004
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Convert crontab to unix timestamp to find next time cron will run

    Hi,

    I have a crontab (ex. 22 12 * * *) and the timestamp that the cron last ran (ex. 1246551957) stored in my database.

    How can I use those 2 values to find the date & time that the cron will run again?

    Thanks in advance!

  2. #2
    SitePoint Addict
    Join Date
    Feb 2004
    Location
    Staffordshire, UK & Florida, USA
    Posts
    314
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The first five fields in the crontab specify when the cron will run (minute, hour, day of month, month, day of week):

    22 12 * * * means 12:22 daily (every day of every month)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •