![]() |
how can I automatically change a filename on my server at a given time of day?
I'm sure there's a way to do it with cron... but I don't know what it is :P
|
or perhaps I could change the permission to make the file unavailable at certain times? hmm...
|
you can cron a cgi script that does it - or cron a php script to do it.
|
that's what I was just thinking.. every day is a school day :P
|
crontab cronfile
where cronfile can possibly contain: * 10 * * * mv 1.html 2.html which means rename 1.html to 2.html at 10.00 each day |
Should have been:
0 10 * * * mv 1.html 2.html |
would cronfile just be a plain text file, like cronfile.txt, with the command in it?
|
yes, it should be a plain text file
|
awesome, thanks buddy
|
You're very welcome :) Did you manage to set it up already?
|
sure did - I actually found an easier way to do it. cronjob:
cd public_html/temp; mv 1.html 2.html thanks though, you got me on the right path! |
cron and dont forget to up it as ascoo
|
This can be quite usefull and helpfull when it comes to getting work done :)
Wolfy - research more about it and you will love it even more ;) |
| All times are GMT -7. The time now is 02:20 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123