P
P
Peter2013-11-18 20:34:33
Task Schedulers
Peter, 2013-11-18 20:34:33

Commands in CRON: calling a script by url

Setting up CRON.
With temporary parameters, it seems, I figured it out, but it's not clear with the commands.

As part of my task - you need to run the script. The script is located in the silex controller. Is it possible to access it by url?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dan Ivanov, 2013-11-19
@Alcospb

From the comments, it is better to write all commands with the full path to the binaries.
If the script is launched simply by "pulling" a certain controller, then as a task it is enough to simply specify its call by CURL'om.
Something like

01 05 * * * user /usr/bin/curl -s http://yourserver.com/controller >> /path/to/file.log

S
Stepan, 2013-11-18
@L3n1n

1. Cron does not need to be configured, you need to add tasks to it!
2. There are no time parameters there, there is a task start time!
3. Google banned you?? There are so many examples that any search engine gives millions of answers to your question!
4. Since you asked the question, do you think that all the psychics are here and should know in which scripting language you are trying to run the script?
What kind of controllers are we talking about? If you have a CMS, what does the CMS have to do with cron?

D
Denis Mashkov, 2013-11-22
@blackdog

Curl and what we call are located on the same server?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question