How to start & enable crontab in ubuntu 16
I have aws image that I have created using ubuntu 16. Where I have cronjob running, I want to make sure that when I start new machine using this image, it (cronjobs) still run new machine.
when I tried following commands
1:
systemctl enable crond.service
I got following errors:
Failed to execute operation: No such file or directory
2:
systemctl status crond.service
I got following error:
● crond.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
3:
service crond status
I got following error:
● crond.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
cron
add a comment |
I have aws image that I have created using ubuntu 16. Where I have cronjob running, I want to make sure that when I start new machine using this image, it (cronjobs) still run new machine.
when I tried following commands
1:
systemctl enable crond.service
I got following errors:
Failed to execute operation: No such file or directory
2:
systemctl status crond.service
I got following error:
● crond.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
3:
service crond status
I got following error:
● crond.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
cron
1
AFAIK it'scron.service
notcrond.service
– steeldriver
Jul 25 '17 at 16:41
add a comment |
I have aws image that I have created using ubuntu 16. Where I have cronjob running, I want to make sure that when I start new machine using this image, it (cronjobs) still run new machine.
when I tried following commands
1:
systemctl enable crond.service
I got following errors:
Failed to execute operation: No such file or directory
2:
systemctl status crond.service
I got following error:
● crond.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
3:
service crond status
I got following error:
● crond.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
cron
I have aws image that I have created using ubuntu 16. Where I have cronjob running, I want to make sure that when I start new machine using this image, it (cronjobs) still run new machine.
when I tried following commands
1:
systemctl enable crond.service
I got following errors:
Failed to execute operation: No such file or directory
2:
systemctl status crond.service
I got following error:
● crond.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
3:
service crond status
I got following error:
● crond.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
cron
cron
asked Jul 25 '17 at 16:12
Kppatel PatelKppatel Patel
11126
11126
1
AFAIK it'scron.service
notcrond.service
– steeldriver
Jul 25 '17 at 16:41
add a comment |
1
AFAIK it'scron.service
notcrond.service
– steeldriver
Jul 25 '17 at 16:41
1
1
AFAIK it's
cron.service
not crond.service
– steeldriver
Jul 25 '17 at 16:41
AFAIK it's
cron.service
not crond.service
– steeldriver
Jul 25 '17 at 16:41
add a comment |
2 Answers
2
active
oldest
votes
As @steeldriver mentioned it is cron.service not crond.service difference with systemd. Anyways you can edit your cronjobs through crontab -e
just follow the instructions for setting the time for each cronjob at the bottom. And when you're done simply save the file and it should say "installing new cronjob", then voila it will magically execute the script at the given time.
add a comment |
4 ways to check status of cron service in Ubuntu:
ps -ef | grep cron
systemctl status cron.service
service cron status
/etc/init.d/cron status
New contributor
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%2f939649%2fhow-to-start-enable-crontab-in-ubuntu-16%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
As @steeldriver mentioned it is cron.service not crond.service difference with systemd. Anyways you can edit your cronjobs through crontab -e
just follow the instructions for setting the time for each cronjob at the bottom. And when you're done simply save the file and it should say "installing new cronjob", then voila it will magically execute the script at the given time.
add a comment |
As @steeldriver mentioned it is cron.service not crond.service difference with systemd. Anyways you can edit your cronjobs through crontab -e
just follow the instructions for setting the time for each cronjob at the bottom. And when you're done simply save the file and it should say "installing new cronjob", then voila it will magically execute the script at the given time.
add a comment |
As @steeldriver mentioned it is cron.service not crond.service difference with systemd. Anyways you can edit your cronjobs through crontab -e
just follow the instructions for setting the time for each cronjob at the bottom. And when you're done simply save the file and it should say "installing new cronjob", then voila it will magically execute the script at the given time.
As @steeldriver mentioned it is cron.service not crond.service difference with systemd. Anyways you can edit your cronjobs through crontab -e
just follow the instructions for setting the time for each cronjob at the bottom. And when you're done simply save the file and it should say "installing new cronjob", then voila it will magically execute the script at the given time.
answered Jul 25 '17 at 17:08
NerdOfCodeNerdOfCode
1,105524
1,105524
add a comment |
add a comment |
4 ways to check status of cron service in Ubuntu:
ps -ef | grep cron
systemctl status cron.service
service cron status
/etc/init.d/cron status
New contributor
add a comment |
4 ways to check status of cron service in Ubuntu:
ps -ef | grep cron
systemctl status cron.service
service cron status
/etc/init.d/cron status
New contributor
add a comment |
4 ways to check status of cron service in Ubuntu:
ps -ef | grep cron
systemctl status cron.service
service cron status
/etc/init.d/cron status
New contributor
4 ways to check status of cron service in Ubuntu:
ps -ef | grep cron
systemctl status cron.service
service cron status
/etc/init.d/cron status
New contributor
New contributor
answered Mar 9 at 11:45
cuimingdacuimingda
112
112
New contributor
New contributor
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%2f939649%2fhow-to-start-enable-crontab-in-ubuntu-16%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
1
AFAIK it's
cron.service
notcrond.service
– steeldriver
Jul 25 '17 at 16:41