Hi all
i try to create a cron job
i want delete all picture ( jpg) that i have in the ftp , not in the “public_htlm” folder, but in the “scan/perso” folder.
all picture that have more than 10 days
could you help me to write the php code ?
where i must put this code (folder ) ?
and what sort of link i must write when i’ll create the cron job ?
000webhost supports Cronjobs. Go to 000webhost cPanel > Settings > Cronjobs to setup one.
Cronjobs can execute only PHP scripts. Core server functions such as exec() are disabled for security reasons; you’ll need to use an alternative code. What do you want to achieve?
i put this code un the notepad file, rename extension with php (effacer.php)
add this in the folder /script
and create a cron job with this link :https://myname.000webhostapp.com/script/effacer.php
and all picture are always here
I offered you a sample code. If you want custom code but you have no coding knowledge, you should either wait for a reply from another forum member, ask your question somewhere else, or hire a freelancer to write the code for you.
Our duty as moderators is to provide 000webhost services support. Writing PHP code for our customers is not related to it.
Check out these replies from Stackoverflow. Adapt the script to your needs: