Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 08-19-2005, 07:10 AM   #1
Wolfy
Confirmed User
 
Wolfy's Avatar
 
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
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 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-19-2005, 07:12 AM   #2
Wolfy
Confirmed User
 
Wolfy's Avatar
 
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
or perhaps I could change the permission to make the file unavailable at certain times? hmm...
Wolfy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-19-2005, 07:16 AM   #3
cpanic
Confirmed User
 
Industry Role:
Join Date: Jan 2004
Posts: 267
you can cron a cgi script that does it - or cron a php script to do it.
__________________
cpanic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-19-2005, 07:17 AM   #4
Wolfy
Confirmed User
 
Wolfy's Avatar
 
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
that's what I was just thinking.. every day is a school day :P
Wolfy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-19-2005, 07:20 AM   #5
Meorazhar
Confirmed User
 
Meorazhar's Avatar
 
Industry Role:
Join Date: May 2005
Location: ICQ: 5262689
Posts: 672
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 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-19-2005, 07:39 AM   #6
Meorazhar
Confirmed User
 
Meorazhar's Avatar
 
Industry Role:
Join Date: May 2005
Location: ICQ: 5262689
Posts: 672
Should have been:
0 10 * * * mv 1.html 2.html
Meorazhar is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-19-2005, 07:49 AM   #7
Wolfy
Confirmed User
 
Wolfy's Avatar
 
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
would cronfile just be a plain text file, like cronfile.txt, with the command in it?
Wolfy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-19-2005, 08:04 AM   #8
Meorazhar
Confirmed User
 
Meorazhar's Avatar
 
Industry Role:
Join Date: May 2005
Location: ICQ: 5262689
Posts: 672
yes, it should be a plain text file
Meorazhar is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-19-2005, 08:06 AM   #9
Wolfy
Confirmed User
 
Wolfy's Avatar
 
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
awesome, thanks buddy
Wolfy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-19-2005, 08:23 AM   #10
Meorazhar
Confirmed User
 
Meorazhar's Avatar
 
Industry Role:
Join Date: May 2005
Location: ICQ: 5262689
Posts: 672
You're very welcome Did you manage to set it up already?
Meorazhar is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-19-2005, 12:45 PM   #11
Wolfy
Confirmed User
 
Wolfy's Avatar
 
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
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!
Wolfy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-19-2005, 12:46 PM   #12
DutchTeenCash
I like Dutch Girls
 
DutchTeenCash's Avatar
 
Join Date: Feb 2003
Location: dutchteencash.com
Posts: 21,684
cron and dont forget to up it as ascoo
DutchTeenCash is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-19-2005, 12:54 PM   #13
Rui
web
 
Join Date: Dec 2001
Location: On icq: 85-483-060
Posts: 9,533
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 ;)
Rui is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.