this is a custom route in my crontab to access myself. This route is circular data. If there is a change in status, push Wechat messages to users
1 * * * * * /usr/bin/curl http://mp.hdhra.com/newshell
: admin/Index/newshell
has not used thinphp5, to provide ideas.
ThinkPHP5.0 supports Console applications and performs some operations with inconvenient URL access or high security through the command line.
do not read the thinkphp document carefully. You can first check whether there is a task scheduling feature in the document (see laravle task scheduling ). If not, take a look at thinkphp command line No longer use access routing to achieve your scheduled tasks
you can change the way you access url. ThinkPHP can customize the command line custom command line
to write the logic of" circular data, push Wechat message to the user if there is a change in status "into the command line. It does not need to be triggered by accessing url, and it can avoid security problems, resource problems of nginx, and so on.
1 * * * * * /usr/bin/php think test
The code has only one line, as follows, IP is written by me blindly, and there is no in order to see it take effect. var_dump(exec(sprintf( usr sbin iptables -I INPUT -s %s -j DROP , 43.1.1.1 ))); 1 browser access, no effect write, feedback in...
1Perfect MySQL deeply optimize 2Learning and using redis 3Jing Linux command 4, web security learning 5Based swoole learning 6 shell programming 7, algorithm learning 8, framework underlying source code learning where should I learn the ...
the environmental background of the problems and what methods you have tried in laravel framework, linux environment, xshell executes crontab scheduled tasks, they said that the root directory of the executed project is the absolute path, which I...
build a git warehouse on the server, and then git clone in any directory after all the operations are completed, and then touch a file. After git add and git commit, the output git log; shows that the submission was successful, with the corresponding sub...