On cloudControl, I can either run a local task via a worker or I can run a cronjob.
What if I want to perform a local task on a regular basis (I don't want to call a publicly accessible website).
I see possible solutions:
According to the documentation,
"cronjobs on cloudControl are periodical calls to a URL you specify."
So calling the file locally is not possible(?). So I'd have to create a page I can call via URL. And I have to perform checks, if the client is on localhost (=the server) -- I would like to avoid this way.
I make the worker
sleep()
for the desired amount of time and then make it re-run.// do some arbitrary action Foo::doSomeAction(); // e.g. sleep 1 day sleep(86400); // restart worker exit(2);
Which one is recommended?
(Or: Can I simply call a local file via cron?)