Gajus
Gajus

Reputation: 73838

settings and canceling CRON jobs

I want to be able to do few things using PHP: to setup CRON to run specific file at a specific moment (easy) and at the same time to get some sort of ID of that job, which would allow me to track/or cancel the job before it was even started. I would keep track of those IDs in my Database.

Upvotes: 1

Views: 199

Answers (2)

fabrik
fabrik

Reputation: 14365

Messing directly with system files likes cron via PHP isn't really a good idea.

  • I would set up a master cron job file first which set up to run at every 5 mins and later will control all of your tasks
  • Build a solid database backend where you can store your tasks (script, start time, frequency etc.)
  • Build a panel where you can manage your tasks, start them, hold them, etc.

Upvotes: 2

Extrakun
Extrakun

Reputation: 19305

Check with your web-host. Besides running cron from the command-line or a script, some web management panels (like CPanel) has a graphical interface for setting up cron jobs.

Upvotes: 1

Related Questions