sql >> Database >  >> RDS >> Mysql

De host staat geen evenementen toe op MySQL, wat is het beste alternatief?

Zoals Jim in de reactie. Probeer Cron Job te gebruiken en bel je PHP-script voor elk uur is mijn alternatieve antwoord.

#!/usr/bin/env php
<?php
# This file would be say, '/usr/local/bin/run.php'
// code
echo "I'm CRON Script"

Een Cron Job-opdrachtstructuur toevoegen:

Minutes [0-59]
|   Hours [0-23]
|   |   Days [1-31]
|   |   |   Months [1-12]
|   |   |   |   Days of the Week [Numeric, 0-6]
|   |   |   |   |
*   *   *   *   * home/path/to/command/the_command.sh

Opdrachtvoorbeeld:

* 1 * * * php-path -f php-script-path &> /dev/null
* 1 * * * /usr/bin/php -f /usr/local/bin/run.php &> /dev/null

Toestemming toevoegen via het CHMOD-commando.

chmod +x /usr/local/bin/run.php

Referentie:
Hoe maak je een cron-job PHP gebruiken?
http://code. tutsplus.com/tutorials/managing-cron-jobs-with-php--net-19428



  1. Het datumformaat vinden dat wordt gebruikt in de huidige sessie in SQL Server (T-SQL)

  2. Proberen wachtwoord op te halen uit database

  3. Mysql join-query voor meerdere tags (veel-op-veel-relatie) die overeenkomt met ALLE tags?

  4. Wat is er nieuw in MariaDB MaxScale 2.4