Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6654995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:27:32+00:00 2026-05-26T01:27:32+00:00

For example, if I want to set up a trigger that fires every hr

  • 0

For example, if I want to set up a trigger that fires every hr passed since the current time, how would I implement that?

I am using PHP to write my backend code, essentially, if a user logged in, I give a sessionID, if there’s no activity every hr , then session timeout. I think it needs to be implement in PHP right?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:27:32+00:00Added an answer on May 26, 2026 at 1:27 am

    No need for job scheduling here. When you give them a session ID, store the session ID in a table in your database. Then do this upon every single request:

    if session id row is found
        if current time - last updated time > 1 hour
            Do not allow access. Session is expired
        else
            update timestamp of session id row, setting it to the current time
            allow access
        end
    end
    

    Essentially: every time the user requests something, you can update a timestamp field in that session’s row in your database. If the current time – last updated time > 1 hour, then the session is invalid and you should not allow the access.

    If you wanted to schedule a job to go delete or otherwise deactivate rows that have expired, that’s fine, but your session management scheme should not depend on that.

    That said, if you don’t have to roll your own session management, don’t. It’s fraught with lots of little details that are easy to overlook, and could result in leaving your site vulnerable. If you still need to roll your own, check out some of the OWASP materials about session management and authentication:

    https://www.owasp.org/index.php/Session_Management_Cheat_Sheet

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is a complete example. I want to forbid using A::set from objects casted
I want to set a cron job that will execute every 15 minutes. Before
I have a image (png file) with opacity 35%, i want for example: Set
Example: Suppose in the following example I want to match strings that do not
Is there any javascript function that can encrypt data: For example i want to
I know that you can set actions to trigger if the user presses a
well, I want to set a different color for each event. Basically that's it
example: I want to see if array[5] holds a value or is empty.
For example I want to be able to programatically hit a line of code
For example: I want: if file1 exists: CLEAN_SRC = *.h file3 else CLEAN_SRC =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.