A
A
aopil2020-04-16 12:04:57
Task Schedulers
aopil, 2020-04-16 12:04:57

How to run a script with cron?

If I specify like this in cron:
/var/www/script/test.php

the script does not start, well, or does not do its job.

And if I do this:
wget http ........
Then everything works!

The second way to run is not quite right, as I understand it?

The question is simple: How to run a script without wget?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Kuts, 2020-04-16
@aopil

which php
will show where php is installed, specify
this path in crontab
For example, if which issued /usr/bin/php, then write it in the cron
/usr/bin/php /var/www/script/test.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question