简体   繁体   中英

Status: 301 Moved Permanently ActiveCollab

I tried to set cronjob on my server for ActiveCollab I use this

*/5 *   *   *   *   php "/home/bbb/public_html/tasks/frequently.php" RnuFA > /dev/null

but it always returns error message :

Status: 301 Moved Permanently

Location: https://mywebsite.com/

Content-type: text/html

I've tried to execute the command through SSH and it worked properly.

Can someone help me telling what configuration on my server that need to be checked for this kind of issue?

Thank you

Official recommendation is to use cURL to trigger scheduled tasks, not executable PHP. Currently it is just a recommendation, but upcoming releases will stop shipping /tasks folder so you will have to use cURL.

There are many environments (more than we expected) where there is one PHP that web server uses to prepare the page, and another PHP that runs via command line interface (CLI). This causes all sort of problems, so we decided to use only way way of triggering tasks - via URL.

Bottom line - use cURL. Documentation is here:

https://activecollab.com/help/books/self-hosted-edition/scheduled-tasks-setup.html

Here are sample commands:

*/3       *      *       *       *       /usr/bin/curl -s -L "http://url/of/frequently?code=XyZty" > /dev/null
0         *      *       *       *       /usr/bin/curl -s -L "http://url/of/hourly?code=XyZty" > /dev/null
0        12      *       *       *       /usr/bin/curl -s -L "http://url/of/daily?code=XyZty" > /dev/null
0         7      *       *       *       /usr/bin/curl -s -L "http://url/of/paper?code=XyZty" > /dev/null

but make sure to check Administration > Scheduled Tasks page of your activeCollab for exact URLs that you need to trigger.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM