Marko Marko - 1 month ago 19
MySQL Question

creating schedule task without Cron job

Scheduled task needs to be created but its not possible to use Cron job (there is a warning from hosting provider that "running the cron Job more than once within a 45-minute period is a infraction of their rules and could result in shutting down the account."

php script (which insert data from txt to mysql database) should be executed every minute, ie this link should be called http://www.myserver.com/ImportCumulusFile.php?type=dayfile&key=letmein&table=Dayfile&file=./data/Jan10log.txt

Is there any other way?

Answer

There are multiple ways of doing repetitive jobs. Some of the ways that I can think about right away are:

  1. Using: https://www.setcronjob.com/

Use an external site like this to fire off your url at set intervals

  1. Using meta refresh. More here. You'd to have to open the page and leave it running.

  2. Javascript/Ajax refresh. Similar to the above example.

  3. Setting up a cron job. Most shared hosting do provide a way to set up cron jobs. Have a look at the cPanel of your hosting.

Comments