Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

[SOLVED] Cron for s...
 
Notifications
Clear all

[SOLVED] Cron for start ProjeQtOr Cron Process

5 Posts
2 Users
0 Reactions
1,924 Views
sharky
(@sharky)
Posts: 47
Active Member
Topic starter
 
[#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


 
Posted : 04 Aug 2023 21H22
sharky
(@sharky)
Posts: 47
Active Member
Topic starter
 

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


 
Posted : 04 Aug 2023 21H41
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

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


 
Posted : 14 Aug 2023 20H11
sharky
(@sharky)
Posts: 47
Active Member
Topic starter
 

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


 
Posted : 14 Aug 2023 22H00
sharky
(@sharky)
Posts: 47
Active Member
Topic starter
 

Yes !

With full path .htapasswd in .htaccess 😉


 
Posted : 14 Aug 2023 22H17
Share:

Scroll to Top