Swap config files at certain times [duplicate]
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
This question already has an answer here:
How to execute a script periodically without using crontab?
2 answers
How do I set up a Cron job?
6 answers
I am trying to make a script that switches files at different times of days so that my settings are pulled at different times like a day mode and a night mode.
If I have a file 1, 2, and 3 which 3 is a group of settings for my server. I want to switch out 1 to become 3 from 8am to 6pm. then I want 2 to become 3 from 6pm to 8am automatically. How can I do this though shell script? I just want to basically do a cp -v 1 3
then cp -v 2 3
on a schedule how would I accomplish this? thanks in advance!
I don't want to do it through cron i want to do it through shell script only, if possible!!
scripts schedule
marked as duplicate by muru, wjandrea, Terrance, Zanna, Eric Carvalho Mar 10 at 12:49
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |Â
up vote
0
down vote
favorite
This question already has an answer here:
How to execute a script periodically without using crontab?
2 answers
How do I set up a Cron job?
6 answers
I am trying to make a script that switches files at different times of days so that my settings are pulled at different times like a day mode and a night mode.
If I have a file 1, 2, and 3 which 3 is a group of settings for my server. I want to switch out 1 to become 3 from 8am to 6pm. then I want 2 to become 3 from 6pm to 8am automatically. How can I do this though shell script? I just want to basically do a cp -v 1 3
then cp -v 2 3
on a schedule how would I accomplish this? thanks in advance!
I don't want to do it through cron i want to do it through shell script only, if possible!!
scripts schedule
marked as duplicate by muru, wjandrea, Terrance, Zanna, Eric Carvalho Mar 10 at 12:49
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
Why not through cron?
â muru
Mar 9 at 2:05
If not via cron, then: askubuntu.com/q/844533/158442
â muru
Mar 9 at 2:07
1
Yes you can do it via script only; the script sleeps for xx hours on a cycle, but why?cron
is more resource efficient. You realize if you switch configs, whatever processes using them will probably need restart (to read the altered config) as they'll likely be reading/using the old config (inode)
â guiverc
Mar 9 at 2:10
Because I'm trying to make it a self contained shell script that i can save on various servers and just run the shell when I want from putty real quick. It is a random thing. More detail on what im doing is running a Zcash miner in ubuntu. and one pool pays good when it finds block but rarely finds blocks so when i see its been 24-48 hours since they've found a block i just want to run the script and switch pools. Because generally once they got that long without a block they are close to finding on and then i wanna switch back to my more steady pay out pool after say 12 hours
â Colt Burdine
Mar 9 at 2:14
If you guys think cron is the way to go still ill do it and yes the process needs to be restarted but i know how to restart it in the script when the script runs.
â Colt Burdine
Mar 9 at 2:15
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This question already has an answer here:
How to execute a script periodically without using crontab?
2 answers
How do I set up a Cron job?
6 answers
I am trying to make a script that switches files at different times of days so that my settings are pulled at different times like a day mode and a night mode.
If I have a file 1, 2, and 3 which 3 is a group of settings for my server. I want to switch out 1 to become 3 from 8am to 6pm. then I want 2 to become 3 from 6pm to 8am automatically. How can I do this though shell script? I just want to basically do a cp -v 1 3
then cp -v 2 3
on a schedule how would I accomplish this? thanks in advance!
I don't want to do it through cron i want to do it through shell script only, if possible!!
scripts schedule
This question already has an answer here:
How to execute a script periodically without using crontab?
2 answers
How do I set up a Cron job?
6 answers
I am trying to make a script that switches files at different times of days so that my settings are pulled at different times like a day mode and a night mode.
If I have a file 1, 2, and 3 which 3 is a group of settings for my server. I want to switch out 1 to become 3 from 8am to 6pm. then I want 2 to become 3 from 6pm to 8am automatically. How can I do this though shell script? I just want to basically do a cp -v 1 3
then cp -v 2 3
on a schedule how would I accomplish this? thanks in advance!
I don't want to do it through cron i want to do it through shell script only, if possible!!
This question already has an answer here:
How to execute a script periodically without using crontab?
2 answers
How do I set up a Cron job?
6 answers
scripts schedule
scripts schedule
edited Mar 9 at 2:04
asked Mar 9 at 1:55
![](https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=32)
![](https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=32)
Colt Burdine
61
61
marked as duplicate by muru, wjandrea, Terrance, Zanna, Eric Carvalho Mar 10 at 12:49
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by muru, wjandrea, Terrance, Zanna, Eric Carvalho Mar 10 at 12:49
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
Why not through cron?
â muru
Mar 9 at 2:05
If not via cron, then: askubuntu.com/q/844533/158442
â muru
Mar 9 at 2:07
1
Yes you can do it via script only; the script sleeps for xx hours on a cycle, but why?cron
is more resource efficient. You realize if you switch configs, whatever processes using them will probably need restart (to read the altered config) as they'll likely be reading/using the old config (inode)
â guiverc
Mar 9 at 2:10
Because I'm trying to make it a self contained shell script that i can save on various servers and just run the shell when I want from putty real quick. It is a random thing. More detail on what im doing is running a Zcash miner in ubuntu. and one pool pays good when it finds block but rarely finds blocks so when i see its been 24-48 hours since they've found a block i just want to run the script and switch pools. Because generally once they got that long without a block they are close to finding on and then i wanna switch back to my more steady pay out pool after say 12 hours
â Colt Burdine
Mar 9 at 2:14
If you guys think cron is the way to go still ill do it and yes the process needs to be restarted but i know how to restart it in the script when the script runs.
â Colt Burdine
Mar 9 at 2:15
add a comment |Â
1
Why not through cron?
â muru
Mar 9 at 2:05
If not via cron, then: askubuntu.com/q/844533/158442
â muru
Mar 9 at 2:07
1
Yes you can do it via script only; the script sleeps for xx hours on a cycle, but why?cron
is more resource efficient. You realize if you switch configs, whatever processes using them will probably need restart (to read the altered config) as they'll likely be reading/using the old config (inode)
â guiverc
Mar 9 at 2:10
Because I'm trying to make it a self contained shell script that i can save on various servers and just run the shell when I want from putty real quick. It is a random thing. More detail on what im doing is running a Zcash miner in ubuntu. and one pool pays good when it finds block but rarely finds blocks so when i see its been 24-48 hours since they've found a block i just want to run the script and switch pools. Because generally once they got that long without a block they are close to finding on and then i wanna switch back to my more steady pay out pool after say 12 hours
â Colt Burdine
Mar 9 at 2:14
If you guys think cron is the way to go still ill do it and yes the process needs to be restarted but i know how to restart it in the script when the script runs.
â Colt Burdine
Mar 9 at 2:15
1
1
Why not through cron?
â muru
Mar 9 at 2:05
Why not through cron?
â muru
Mar 9 at 2:05
If not via cron, then: askubuntu.com/q/844533/158442
â muru
Mar 9 at 2:07
If not via cron, then: askubuntu.com/q/844533/158442
â muru
Mar 9 at 2:07
1
1
Yes you can do it via script only; the script sleeps for xx hours on a cycle, but why?
cron
is more resource efficient. You realize if you switch configs, whatever processes using them will probably need restart (to read the altered config) as they'll likely be reading/using the old config (inode)â guiverc
Mar 9 at 2:10
Yes you can do it via script only; the script sleeps for xx hours on a cycle, but why?
cron
is more resource efficient. You realize if you switch configs, whatever processes using them will probably need restart (to read the altered config) as they'll likely be reading/using the old config (inode)â guiverc
Mar 9 at 2:10
Because I'm trying to make it a self contained shell script that i can save on various servers and just run the shell when I want from putty real quick. It is a random thing. More detail on what im doing is running a Zcash miner in ubuntu. and one pool pays good when it finds block but rarely finds blocks so when i see its been 24-48 hours since they've found a block i just want to run the script and switch pools. Because generally once they got that long without a block they are close to finding on and then i wanna switch back to my more steady pay out pool after say 12 hours
â Colt Burdine
Mar 9 at 2:14
Because I'm trying to make it a self contained shell script that i can save on various servers and just run the shell when I want from putty real quick. It is a random thing. More detail on what im doing is running a Zcash miner in ubuntu. and one pool pays good when it finds block but rarely finds blocks so when i see its been 24-48 hours since they've found a block i just want to run the script and switch pools. Because generally once they got that long without a block they are close to finding on and then i wanna switch back to my more steady pay out pool after say 12 hours
â Colt Burdine
Mar 9 at 2:14
If you guys think cron is the way to go still ill do it and yes the process needs to be restarted but i know how to restart it in the script when the script runs.
â Colt Burdine
Mar 9 at 2:15
If you guys think cron is the way to go still ill do it and yes the process needs to be restarted but i know how to restart it in the script when the script runs.
â Colt Burdine
Mar 9 at 2:15
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
1
Why not through cron?
â muru
Mar 9 at 2:05
If not via cron, then: askubuntu.com/q/844533/158442
â muru
Mar 9 at 2:07
1
Yes you can do it via script only; the script sleeps for xx hours on a cycle, but why?
cron
is more resource efficient. You realize if you switch configs, whatever processes using them will probably need restart (to read the altered config) as they'll likely be reading/using the old config (inode)â guiverc
Mar 9 at 2:10
Because I'm trying to make it a self contained shell script that i can save on various servers and just run the shell when I want from putty real quick. It is a random thing. More detail on what im doing is running a Zcash miner in ubuntu. and one pool pays good when it finds block but rarely finds blocks so when i see its been 24-48 hours since they've found a block i just want to run the script and switch pools. Because generally once they got that long without a block they are close to finding on and then i wanna switch back to my more steady pay out pool after say 12 hours
â Colt Burdine
Mar 9 at 2:14
If you guys think cron is the way to go still ill do it and yes the process needs to be restarted but i know how to restart it in the script when the script runs.
â Colt Burdine
Mar 9 at 2:15