0

I was wondering if anyone know a way how to display and edit crons from a certain user in PHP? I've tried googling and I couldn't come up with anything.

Alternatively, is there a way to set a certain cron with an ID, so that it's easier to find for editing purposes?

Thanks!

user5740843
  • 1,540
  • 5
  • 22
  • 42

1 Answers1

1

you can use some commands to:

  1. export current crontab: crontab -l > /some/file

  2. do your own cooking with editing this file via php

  3. tell cron to use your edited file : crontab /some/file

using exec() to run those commands should be fine.

Ith seems there are also some libraries out there that would do this for you, like Jobby...

n00dl3
  • 21,213
  • 7
  • 66
  • 76