do php file at a time according to database

AzizAhmad

I'm creating a website and in my website I have a MySQL database. In the database there is a table that has two property "date" and "time". I want to run a php code on a date and time according to records of table, automatically. How can I do it?

Atli

I see three options, listed here in order of difficulty to implement, easiest to hardest.

  1. Create a script that is scheduled to execute every now and then (exact timing would depend on your needs for accuracy), which checks the database to see if there are any items in there that should have been executed in the time span since it's last execution. If there are, execute them.

  2. Write a daemon application/script to monitor your database, and execute the tasks when needed. This one is not all that different from #1 except that it wouldn't require scheduling or manual triggering. That could be handled within the application/script itself.

  3. Create a script that checks the database for changes, and schedules/reschedules/removes any tasks accordingly. This script would then be scheduled to execute every now and then and/or be executed manually by the application that manages the database.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

How do I send a time to a MySql database with PHP?

분류에서Dev

jQuery/PHP: Refresh page according to server time

분류에서Dev

Download PDF file from database using PHP

분류에서Dev

how do design the database tables for file download statistics

분류에서Dev

php and mysql database not working when i do search

분류에서Dev

Rewrite git history according to a .mailmap file

분류에서Dev

Average Database Query Time

분류에서Dev

displaying data from MySQL in PHP according to a condition

분류에서Dev

How do I find a time stamp on a file and then echo it into the contents of the file as the first line?

분류에서Dev

How to match strings in file names and rename file according to string?

분류에서Dev

How do I move files not accessed for a long time using a batch file?

분류에서Dev

Where is the database file? Rails

분류에서Dev

How to sort files into folders, according to file names - Windows CMD

분류에서Dev

Why std::istream::read moves the file pointer NOT according to bytes read

분류에서Dev

Python config parser array sort according to file content sequence

분류에서Dev

how to control users login on Linux machine according to configuration file

분류에서Dev

PHP is not creating MySQL database

분류에서Dev

PHP form post to database

분류에서Dev

PHP programming , MySQL database

분류에서Dev

PHP Sorting of Database Results

분류에서Dev

php form and database structure

분류에서Dev

How do I change the date according to the length of the string?

분류에서Dev

PHP time intervals

분류에서Dev

Transform seconds in time in PHP

분류에서Dev

PHP Time Zone Function

분류에서Dev

Get local time in PHP

분류에서Dev

Reduce PHP execution time

분류에서Dev

timestamp, modification time, and created time of a file

분류에서Dev

How can I run sed to replace lines in a file or do similar things in PHP?

Related 관련 기사

  1. 1

    How do I send a time to a MySql database with PHP?

  2. 2

    jQuery/PHP: Refresh page according to server time

  3. 3

    Download PDF file from database using PHP

  4. 4

    how do design the database tables for file download statistics

  5. 5

    php and mysql database not working when i do search

  6. 6

    Rewrite git history according to a .mailmap file

  7. 7

    Average Database Query Time

  8. 8

    displaying data from MySQL in PHP according to a condition

  9. 9

    How do I find a time stamp on a file and then echo it into the contents of the file as the first line?

  10. 10

    How to match strings in file names and rename file according to string?

  11. 11

    How do I move files not accessed for a long time using a batch file?

  12. 12

    Where is the database file? Rails

  13. 13

    How to sort files into folders, according to file names - Windows CMD

  14. 14

    Why std::istream::read moves the file pointer NOT according to bytes read

  15. 15

    Python config parser array sort according to file content sequence

  16. 16

    how to control users login on Linux machine according to configuration file

  17. 17

    PHP is not creating MySQL database

  18. 18

    PHP form post to database

  19. 19

    PHP programming , MySQL database

  20. 20

    PHP Sorting of Database Results

  21. 21

    php form and database structure

  22. 22

    How do I change the date according to the length of the string?

  23. 23

    PHP time intervals

  24. 24

    Transform seconds in time in PHP

  25. 25

    PHP Time Zone Function

  26. 26

    Get local time in PHP

  27. 27

    Reduce PHP execution time

  28. 28

    timestamp, modification time, and created time of a file

  29. 29

    How can I run sed to replace lines in a file or do similar things in PHP?

뜨겁다태그

보관