Execute php file via Cron Job with Correct Rights

psnabe

Registered
Jan 15, 2007
3
0
151
Hi

I need to execute the PHP script located here:
github.com/ClouDNS/cloudns-api-bulk-updates/blob/master/cpanel-slave-zones-add/cpanel-slave-zones-add.php via Cron Jobs.

But there do I place the php file - so it works? The script needs to be able to read:/var/named/ and write to /tmp/cloudns_invalid-zone-names.txt
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
Hello,

You could add the PHP script to the root directory (e.g. /root/custom-directory/script.php) and then add the cron job using the "crontab -e" command while logged in via SSH as root.

Keep in mind that's a third-party script, and thus any issues that arise from it's use are unsupported.

Thank you.