GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   how can I automatically change a filename on my server at a given time of day? (https://gfy.com/showthread.php?t=505672)

Wolfy 08-19-2005 07:10 AM

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

Wolfy 08-19-2005 07:12 AM

or perhaps I could change the permission to make the file unavailable at certain times? hmm...

cpanic 08-19-2005 07:16 AM

you can cron a cgi script that does it - or cron a php script to do it.

Wolfy 08-19-2005 07:17 AM

that's what I was just thinking.. every day is a school day :P

Meorazhar 08-19-2005 07:20 AM

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

Meorazhar 08-19-2005 07:39 AM

Should have been:
0 10 * * * mv 1.html 2.html

Wolfy 08-19-2005 07:49 AM

would cronfile just be a plain text file, like cronfile.txt, with the command in it?

Meorazhar 08-19-2005 08:04 AM

yes, it should be a plain text file

Wolfy 08-19-2005 08:06 AM

awesome, thanks buddy

Meorazhar 08-19-2005 08:23 AM

You're very welcome :) Did you manage to set it up already?

Wolfy 08-19-2005 12:45 PM

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!

DutchTeenCash 08-19-2005 12:46 PM

cron and dont forget to up it as ascoo

Rui 08-19-2005 12:54 PM

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