Cronjob output is getting saved automatically on a wrong place

alwaysbusy

Verified User
Joined
Apr 19, 2020
Messages
108
Hi

in Directadmin i created in an user account a cronjob:
time interval: 5minutes

Command: /usr/local/bin/php /home/myusername/domains/mydomain.com/public_html/myfolder/cron.php

The thing is, when the cronjob is executed, the output is saved in the server path: "Server:/" - outside of publich html - see picture.

I tested my cronjob file with 2 free cronjob services (for example (https://www.easycron.com/, https://cron-job.org/) and they are saving the output correctly within "myfolder. So in domains/mydomain.com/public_html/myfolder/output.php like it should be.

Is there something wrong configurated on my server? My technicians always tell me on the server is everything correc, but why are 2 different services are saving my output file in the correct path and my server is saving exactly the same file outside of the public_html folder?

Hope that someone can give me a tip, what i can do.

Thanks & Greets
 

Attachments

  • cronjob.png
    cronjob.png
    17.7 KB · Views: 56
  • outside of public_html.png
    outside of public_html.png
    5.3 KB · Views: 48
No, It normally if you work with crontab ( cronjob ) in DA, this make for calculate log file size of their user

Normally crontab will have default " Worker DIR " to "/home/(user)"
so everything you should provide fullname of filepath that you using,

if you want to specific logpath, should do command like this

Code:
/usr/local/bin/php /home/myusername/domains/mydomain.com/public_html/myfolder/cron.php >> /home/myusername/public_html/logfile.log 2>&1
 
Back
Top