Unlink .txt file every 2 hours

AnonLeo

Regular Member
Joined
Nov 23, 2013
Messages
363
Reaction score
275
I was looking at the PHP site and found the "unlink" script

what I want is a time script to automatically unlink my "usernames.txt" file every 2 hours

Is it possible to do that?

Thanks :)
 
Yeah. Search for "cron" - you can customize the crontab to any period you want. Then a cron job can run your script every 2 hours.
 
That's what they told me on Stackoverflow, but I don't understand the corn and how it works :/
 
Just for your info.

There is a slight difference between cron returned by google to the cron you implement on a shared hosting.

Technically, there isn't a difference.
But on shared hosting, you cannot access the shell directly, thus, you need to set the cron job through the cpanel or plesk, which is a more user friendly interface, to achieve the same result.
Logically, the cpanel version is more user friendly, thus, if you master the command line version, the cpanel should not be a problem.
 
I have a cpanel (VPS), I searched for "corn" and didn't find any results :/
 
Corn.jpg

.
 
every cPanel supports cron jobs. this basicly is a program witch runs on specific time interval /you configurate that/ and run a php file with the unlick function.
 
Has anyone found the corn job yet? Poor guy is going to never be able to schedule a task without thinking about Nebraska...

gtownfunk
 
I was looking at the PHP site and found the "unlink" script

what I want is a time script to automatically unlink my "usernames.txt" file every 2 hours

Is it possible to do that?

Thanks :)


Simply create a PHP file with the unlink method and set the cron as: 0 */2 * * * /path-to-php-file
 
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features and essential functions on BlackHatWorld and other forums. These functions are unrelated to ads, such as internal links and images. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock