Forum

[SOLVED] Cron for s...
 
Notifications
Retirer tout

[SOLVED] Cron for start ProjeQtOr Cron Process

5 Posts
2 Utilisateurs
0 Reactions
1,887 Vu
sharky
(@sharky)
Posts: 47
Trusted Member
Début du sujet
 
[#8997]

Hi,
I try to put a cron that restarts the ProjeQtor cron by following this procedure:
https://www.projeqtor.org/en/forum/9-tips-tricks/10278-how-to-ensure-projeqtor-cron-process-is-always-running

I created the user in ProjeQtor, secured the /api folder according to the documentation.
Create the script PHP by copying the information and adapting values: URL, user and password.
If I open the page directly in the browser: Info: Starting ProjeQtOr cron process for https://[my URL]/ Error: failed to start ProjeQtOr cron process

What questions me is that the API folder is empty for me is and in the downloaded zip.
On the other hand, the script uses API sub-folders

$fullUrl=$siteUrl."api/Cron/check";
or
$fullUrl=$siteUrl."api/Cron/start";

Is something missing?
What else can I control?

Thanks for your help
sharky


 
Posté : 04/08/2023 9:22 pm
sharky
(@sharky)
Posts: 47
Trusted Member
Début du sujet
 

Hello,

I also tried doing a bash .sh, but I got the same error.
It was the header that gave me the idea
#!/usr/bin/php


 
Posté : 04/08/2023 9:41 pm
(@babynus)
Posts: 14952
Membre Admin
 

Possibly access to API is wrong.
Check htaccess...


 
Posté : 14/08/2023 8:11 pm
sharky
(@sharky)
Posts: 47
Trusted Member
Début du sujet
 

Hi,

Thank you.

I have try : remove login, comment in .htaccess

# AuthUserFile "./.htpasswd"
# AuthName "Projets"
# AuthType Basic
# require valid-user

Result

{"error":"invalid API query", "message":""user '' unknown in database""}

I created the user with the same password in my ProjeQtor instance
But I can't access the api folder
I created the .htpasswd using the command

htpasswd -c -B .htpasswd CronJobTask

I also tested with a generator
https://www.web2generators.com/apache-tools/htpasswd-generator

Same issue

Spoiler
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.

other ideas


 
Posté : 14/08/2023 10:00 pm
sharky
(@sharky)
Posts: 47
Trusted Member
Début du sujet
 

Yes !

With full path .htapasswd in .htaccess 😉


 
Posté : 14/08/2023 10:17 pm
Share:
Retour en haut