Trying to run a daemon with crontab
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
Im very new to linux/ubuntu, and I learned a few stuff by setting up few nodes for cryptocurrencies like Zcoin. I keep bumping into one issue though!
In nodes, if your server is disconnected/offline/ doesn't run for whatever reason for more than 3h, they you are penalized and you are ending up in the end of the queue. Im hosting with Vultr at the moment(running ubuntu 16.04), and occasionally, they will put some servers into maintenance/reboot for hardware failure/some repairs.
So, ideally , i would love a way to have a cronjob that could bring the daemon(the zcoin daemon in my case) back to life on every reboot !
At the moment, after i login to the server, i type those 2 commands:
cd ~/zcoin-0.13.7/bin
and then./zcoind -daemon
And that's it!
Can someone please tell me how on earth I need to put the syntax on the crontab -e
?!?
server cron
add a comment |
Im very new to linux/ubuntu, and I learned a few stuff by setting up few nodes for cryptocurrencies like Zcoin. I keep bumping into one issue though!
In nodes, if your server is disconnected/offline/ doesn't run for whatever reason for more than 3h, they you are penalized and you are ending up in the end of the queue. Im hosting with Vultr at the moment(running ubuntu 16.04), and occasionally, they will put some servers into maintenance/reboot for hardware failure/some repairs.
So, ideally , i would love a way to have a cronjob that could bring the daemon(the zcoin daemon in my case) back to life on every reboot !
At the moment, after i login to the server, i type those 2 commands:
cd ~/zcoin-0.13.7/bin
and then./zcoind -daemon
And that's it!
Can someone please tell me how on earth I need to put the syntax on the crontab -e
?!?
server cron
add a comment |
Im very new to linux/ubuntu, and I learned a few stuff by setting up few nodes for cryptocurrencies like Zcoin. I keep bumping into one issue though!
In nodes, if your server is disconnected/offline/ doesn't run for whatever reason for more than 3h, they you are penalized and you are ending up in the end of the queue. Im hosting with Vultr at the moment(running ubuntu 16.04), and occasionally, they will put some servers into maintenance/reboot for hardware failure/some repairs.
So, ideally , i would love a way to have a cronjob that could bring the daemon(the zcoin daemon in my case) back to life on every reboot !
At the moment, after i login to the server, i type those 2 commands:
cd ~/zcoin-0.13.7/bin
and then./zcoind -daemon
And that's it!
Can someone please tell me how on earth I need to put the syntax on the crontab -e
?!?
server cron
Im very new to linux/ubuntu, and I learned a few stuff by setting up few nodes for cryptocurrencies like Zcoin. I keep bumping into one issue though!
In nodes, if your server is disconnected/offline/ doesn't run for whatever reason for more than 3h, they you are penalized and you are ending up in the end of the queue. Im hosting with Vultr at the moment(running ubuntu 16.04), and occasionally, they will put some servers into maintenance/reboot for hardware failure/some repairs.
So, ideally , i would love a way to have a cronjob that could bring the daemon(the zcoin daemon in my case) back to life on every reboot !
At the moment, after i login to the server, i type those 2 commands:
cd ~/zcoin-0.13.7/bin
and then./zcoind -daemon
And that's it!
Can someone please tell me how on earth I need to put the syntax on the crontab -e
?!?
server cron
server cron
edited Apr 7 at 14:57
Aleksandros F.
asked Apr 6 at 23:52
Aleksandros F.Aleksandros F.
64
64
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Please use the official supported method (I copied only the relevant parts regarding Linux and systemd):
Sample init scripts and service configuration for bitcoind
Sample scripts and configuration files for systemd, Upstart and OpenRC can be found in the contrib/init folder.
contrib/init/bitcoind.service: systemd service unit configuration
4a) systemd
Installing this .service file consists of just copying it to
/usr/lib/systemd/system
directory, followed by the commandsystemctl daemon-reload
in order to update running systemd configuration.
To test, run
systemctl start zcoind
and to enable for system startup runsystemctl enable zcoind
The service itself has a Restart=always
.
add a comment |
Finally found it. after crontab -e i put on the last line :
@reboot ~/zcoin-0.13.7/bin/zcoind -daemon
I'll leave it here in case someone else finds it useful!
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1131764%2ftrying-to-run-a-daemon-with-crontab%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Please use the official supported method (I copied only the relevant parts regarding Linux and systemd):
Sample init scripts and service configuration for bitcoind
Sample scripts and configuration files for systemd, Upstart and OpenRC can be found in the contrib/init folder.
contrib/init/bitcoind.service: systemd service unit configuration
4a) systemd
Installing this .service file consists of just copying it to
/usr/lib/systemd/system
directory, followed by the commandsystemctl daemon-reload
in order to update running systemd configuration.
To test, run
systemctl start zcoind
and to enable for system startup runsystemctl enable zcoind
The service itself has a Restart=always
.
add a comment |
Please use the official supported method (I copied only the relevant parts regarding Linux and systemd):
Sample init scripts and service configuration for bitcoind
Sample scripts and configuration files for systemd, Upstart and OpenRC can be found in the contrib/init folder.
contrib/init/bitcoind.service: systemd service unit configuration
4a) systemd
Installing this .service file consists of just copying it to
/usr/lib/systemd/system
directory, followed by the commandsystemctl daemon-reload
in order to update running systemd configuration.
To test, run
systemctl start zcoind
and to enable for system startup runsystemctl enable zcoind
The service itself has a Restart=always
.
add a comment |
Please use the official supported method (I copied only the relevant parts regarding Linux and systemd):
Sample init scripts and service configuration for bitcoind
Sample scripts and configuration files for systemd, Upstart and OpenRC can be found in the contrib/init folder.
contrib/init/bitcoind.service: systemd service unit configuration
4a) systemd
Installing this .service file consists of just copying it to
/usr/lib/systemd/system
directory, followed by the commandsystemctl daemon-reload
in order to update running systemd configuration.
To test, run
systemctl start zcoind
and to enable for system startup runsystemctl enable zcoind
The service itself has a Restart=always
.
Please use the official supported method (I copied only the relevant parts regarding Linux and systemd):
Sample init scripts and service configuration for bitcoind
Sample scripts and configuration files for systemd, Upstart and OpenRC can be found in the contrib/init folder.
contrib/init/bitcoind.service: systemd service unit configuration
4a) systemd
Installing this .service file consists of just copying it to
/usr/lib/systemd/system
directory, followed by the commandsystemctl daemon-reload
in order to update running systemd configuration.
To test, run
systemctl start zcoind
and to enable for system startup runsystemctl enable zcoind
The service itself has a Restart=always
.
answered Apr 7 at 15:05
RinzwindRinzwind
211k28406541
211k28406541
add a comment |
add a comment |
Finally found it. after crontab -e i put on the last line :
@reboot ~/zcoin-0.13.7/bin/zcoind -daemon
I'll leave it here in case someone else finds it useful!
add a comment |
Finally found it. after crontab -e i put on the last line :
@reboot ~/zcoin-0.13.7/bin/zcoind -daemon
I'll leave it here in case someone else finds it useful!
add a comment |
Finally found it. after crontab -e i put on the last line :
@reboot ~/zcoin-0.13.7/bin/zcoind -daemon
I'll leave it here in case someone else finds it useful!
Finally found it. after crontab -e i put on the last line :
@reboot ~/zcoin-0.13.7/bin/zcoind -daemon
I'll leave it here in case someone else finds it useful!
edited Apr 7 at 15:06
Rinzwind
211k28406541
211k28406541
answered Apr 7 at 15:03
Aleksandros F.Aleksandros F.
64
64
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1131764%2ftrying-to-run-a-daemon-with-crontab%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown