我有一个想要通过cron执行的函数。如果我只是访问url www.example.com/TestProjects/codeigniter/controller/function
这个函数可以正常运行,但如果我把它设置为cron任务就无法工作。
我尝试将其设置为:
public_html/TestProjects/codeigniter/controller/function
并且会通过以下错误信息来表示
public_html/TestProjects/codeigniter/controller/function: Not a directory
请问有人可以帮我设置这个定时任务吗?
curl whatever > /dev/null
添加到您的 crontab 中。 - georg