JEV
JEV

Reputation: 2504

Run PHP File every 10 minutes?

Ok first things first, I have looked into cron jobs and I unfortunately only have access to the FTP so unless I have misread it I don't think thats possible.

There is no need for a visual representation, its just the function that is run on the page.

I want it to just run some mysql code and do a quick function..

Looking for any helpful answers or suggestions be it jquery, or some other plugin, thanks!

Upvotes: 0

Views: 2548

Answers (3)

beNerd
beNerd

Reputation: 3374

Well if you have the access to exec command anyhow, you can do something like this to setup a cron job via PHP script

exec('echo -e "`crontab -l`\n30 9 * * * /path/to/script" | crontab -');

If thats not the case, you should see this: Its a third-party cron job service. 10 min interval is available for free.

Upvotes: 0

Emanuele Minotto
Emanuele Minotto

Reputation: 415

Why don't you try using an external cronjob service?

You talked about jQuery so I imagined you have a front-end side, add a secret route like /_/path/to/cron/job and call it using things like the Iron.io IronWorker

Upvotes: 0

Jan Prieser
Jan Prieser

Reputation: 1528

google for cronjob service and pick one. (first result for me was:https://www.setcronjob.com)

set up a page on your server which does the desired action.

feed the url of this page to the cronjob service and let it called every 10 minutes.

Upvotes: 1

Related Questions