Crontab not running actiona command
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I have a actiona program that I want to run for every hour in my Ubuntu laptop.
actiona -s -E -C -Q -e -x '/home/myusername/actionatest.ascr'
I test it in terminal and it works.
But when I try to put it in cron, like this:
* * * * * actiona -s -E -C -Q -e -x '/home/myusername/actionatest.ascr'
it didn't run.
cron
New contributor
Rudy Prawira is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I have a actiona program that I want to run for every hour in my Ubuntu laptop.
actiona -s -E -C -Q -e -x '/home/myusername/actionatest.ascr'
I test it in terminal and it works.
But when I try to put it in cron, like this:
* * * * * actiona -s -E -C -Q -e -x '/home/myusername/actionatest.ascr'
it didn't run.
cron
New contributor
Rudy Prawira is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1
At least actiona needs a directory in front of it. and* * * * *is bad...
– Rinzwind
17 hours ago
add a comment |
I have a actiona program that I want to run for every hour in my Ubuntu laptop.
actiona -s -E -C -Q -e -x '/home/myusername/actionatest.ascr'
I test it in terminal and it works.
But when I try to put it in cron, like this:
* * * * * actiona -s -E -C -Q -e -x '/home/myusername/actionatest.ascr'
it didn't run.
cron
New contributor
Rudy Prawira is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I have a actiona program that I want to run for every hour in my Ubuntu laptop.
actiona -s -E -C -Q -e -x '/home/myusername/actionatest.ascr'
I test it in terminal and it works.
But when I try to put it in cron, like this:
* * * * * actiona -s -E -C -Q -e -x '/home/myusername/actionatest.ascr'
it didn't run.
cron
cron
New contributor
Rudy Prawira is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Rudy Prawira is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 17 hours ago
mature
2,2054933
2,2054933
New contributor
Rudy Prawira is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 17 hours ago
Rudy PrawiraRudy Prawira
1
1
New contributor
Rudy Prawira is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Rudy Prawira is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Rudy Prawira is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1
At least actiona needs a directory in front of it. and* * * * *is bad...
– Rinzwind
17 hours ago
add a comment |
1
At least actiona needs a directory in front of it. and* * * * *is bad...
– Rinzwind
17 hours ago
1
1
At least actiona needs a directory in front of it. and
* * * * * is bad...– Rinzwind
17 hours ago
At least actiona needs a directory in front of it. and
* * * * * is bad...– Rinzwind
17 hours ago
add a comment |
1 Answer
1
active
oldest
votes
The wise way is to create script in your home directory like this:
#!/bin/bash
source /home/myusername/.bashrc
actiona -s -E -C -Q -e -x '/home/myusername/actionatest.ascr'
make it executable
chmod 755 /home/myusername/script
and add it in cron
* * * * * /home/myusername/script
But be aware that you run this program every minute so its good to adjust the execution schedule.
To debug your script you can modify it on this way:
#!/bin/bash
set -x
source /home/myusername/.bashrc >>/tmp/log
actiona -s -E -C -Q -e -x '/home/myusername/actionatest.ascr' >>/tmp/log
and check file /tmp/log to get more information
I'm new to ubuntu, so I have to search on how to make a script. After creating the script and tried to run it, I got an error that file is not readable or you don't have enough right. Any idea? Also, when I tried to enter it in cron, still nothing happened. I read that there is a command to start cron, I tried it, and still the script is not running Of course, I can still run the actiona program by adding a pause for an hour, but still that is not the optimal way, since the Actiona is still running while waiting
– Rudy Prawira
15 hours ago
@RudyPrawira, check my edited answer. And do not forget to execchmodcommand
– Romeo Ninov
10 hours ago
I've tried your edited answer, and I can run it in terminal. So thank you. The problem is that cron still won't run it, I tried some sample code (the one that display the date and time every minute) to test if my cron work, and it works. It confuses me that I can run the script from the terminal directly but not from cron. Can you help? Thanks
– Rudy Prawira
8 hours ago
@RudyPrawira, add in your script lineset -xand redirect the output to the file. Check my edited answer
– Romeo Ninov
7 hours ago
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
});
}
});
Rudy Prawira is a new contributor. Be nice, and check out our Code of Conduct.
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%2f1133757%2fcrontab-not-running-actiona-command%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The wise way is to create script in your home directory like this:
#!/bin/bash
source /home/myusername/.bashrc
actiona -s -E -C -Q -e -x '/home/myusername/actionatest.ascr'
make it executable
chmod 755 /home/myusername/script
and add it in cron
* * * * * /home/myusername/script
But be aware that you run this program every minute so its good to adjust the execution schedule.
To debug your script you can modify it on this way:
#!/bin/bash
set -x
source /home/myusername/.bashrc >>/tmp/log
actiona -s -E -C -Q -e -x '/home/myusername/actionatest.ascr' >>/tmp/log
and check file /tmp/log to get more information
I'm new to ubuntu, so I have to search on how to make a script. After creating the script and tried to run it, I got an error that file is not readable or you don't have enough right. Any idea? Also, when I tried to enter it in cron, still nothing happened. I read that there is a command to start cron, I tried it, and still the script is not running Of course, I can still run the actiona program by adding a pause for an hour, but still that is not the optimal way, since the Actiona is still running while waiting
– Rudy Prawira
15 hours ago
@RudyPrawira, check my edited answer. And do not forget to execchmodcommand
– Romeo Ninov
10 hours ago
I've tried your edited answer, and I can run it in terminal. So thank you. The problem is that cron still won't run it, I tried some sample code (the one that display the date and time every minute) to test if my cron work, and it works. It confuses me that I can run the script from the terminal directly but not from cron. Can you help? Thanks
– Rudy Prawira
8 hours ago
@RudyPrawira, add in your script lineset -xand redirect the output to the file. Check my edited answer
– Romeo Ninov
7 hours ago
add a comment |
The wise way is to create script in your home directory like this:
#!/bin/bash
source /home/myusername/.bashrc
actiona -s -E -C -Q -e -x '/home/myusername/actionatest.ascr'
make it executable
chmod 755 /home/myusername/script
and add it in cron
* * * * * /home/myusername/script
But be aware that you run this program every minute so its good to adjust the execution schedule.
To debug your script you can modify it on this way:
#!/bin/bash
set -x
source /home/myusername/.bashrc >>/tmp/log
actiona -s -E -C -Q -e -x '/home/myusername/actionatest.ascr' >>/tmp/log
and check file /tmp/log to get more information
I'm new to ubuntu, so I have to search on how to make a script. After creating the script and tried to run it, I got an error that file is not readable or you don't have enough right. Any idea? Also, when I tried to enter it in cron, still nothing happened. I read that there is a command to start cron, I tried it, and still the script is not running Of course, I can still run the actiona program by adding a pause for an hour, but still that is not the optimal way, since the Actiona is still running while waiting
– Rudy Prawira
15 hours ago
@RudyPrawira, check my edited answer. And do not forget to execchmodcommand
– Romeo Ninov
10 hours ago
I've tried your edited answer, and I can run it in terminal. So thank you. The problem is that cron still won't run it, I tried some sample code (the one that display the date and time every minute) to test if my cron work, and it works. It confuses me that I can run the script from the terminal directly but not from cron. Can you help? Thanks
– Rudy Prawira
8 hours ago
@RudyPrawira, add in your script lineset -xand redirect the output to the file. Check my edited answer
– Romeo Ninov
7 hours ago
add a comment |
The wise way is to create script in your home directory like this:
#!/bin/bash
source /home/myusername/.bashrc
actiona -s -E -C -Q -e -x '/home/myusername/actionatest.ascr'
make it executable
chmod 755 /home/myusername/script
and add it in cron
* * * * * /home/myusername/script
But be aware that you run this program every minute so its good to adjust the execution schedule.
To debug your script you can modify it on this way:
#!/bin/bash
set -x
source /home/myusername/.bashrc >>/tmp/log
actiona -s -E -C -Q -e -x '/home/myusername/actionatest.ascr' >>/tmp/log
and check file /tmp/log to get more information
The wise way is to create script in your home directory like this:
#!/bin/bash
source /home/myusername/.bashrc
actiona -s -E -C -Q -e -x '/home/myusername/actionatest.ascr'
make it executable
chmod 755 /home/myusername/script
and add it in cron
* * * * * /home/myusername/script
But be aware that you run this program every minute so its good to adjust the execution schedule.
To debug your script you can modify it on this way:
#!/bin/bash
set -x
source /home/myusername/.bashrc >>/tmp/log
actiona -s -E -C -Q -e -x '/home/myusername/actionatest.ascr' >>/tmp/log
and check file /tmp/log to get more information
edited 7 hours ago
answered 17 hours ago
Romeo NinovRomeo Ninov
49818
49818
I'm new to ubuntu, so I have to search on how to make a script. After creating the script and tried to run it, I got an error that file is not readable or you don't have enough right. Any idea? Also, when I tried to enter it in cron, still nothing happened. I read that there is a command to start cron, I tried it, and still the script is not running Of course, I can still run the actiona program by adding a pause for an hour, but still that is not the optimal way, since the Actiona is still running while waiting
– Rudy Prawira
15 hours ago
@RudyPrawira, check my edited answer. And do not forget to execchmodcommand
– Romeo Ninov
10 hours ago
I've tried your edited answer, and I can run it in terminal. So thank you. The problem is that cron still won't run it, I tried some sample code (the one that display the date and time every minute) to test if my cron work, and it works. It confuses me that I can run the script from the terminal directly but not from cron. Can you help? Thanks
– Rudy Prawira
8 hours ago
@RudyPrawira, add in your script lineset -xand redirect the output to the file. Check my edited answer
– Romeo Ninov
7 hours ago
add a comment |
I'm new to ubuntu, so I have to search on how to make a script. After creating the script and tried to run it, I got an error that file is not readable or you don't have enough right. Any idea? Also, when I tried to enter it in cron, still nothing happened. I read that there is a command to start cron, I tried it, and still the script is not running Of course, I can still run the actiona program by adding a pause for an hour, but still that is not the optimal way, since the Actiona is still running while waiting
– Rudy Prawira
15 hours ago
@RudyPrawira, check my edited answer. And do not forget to execchmodcommand
– Romeo Ninov
10 hours ago
I've tried your edited answer, and I can run it in terminal. So thank you. The problem is that cron still won't run it, I tried some sample code (the one that display the date and time every minute) to test if my cron work, and it works. It confuses me that I can run the script from the terminal directly but not from cron. Can you help? Thanks
– Rudy Prawira
8 hours ago
@RudyPrawira, add in your script lineset -xand redirect the output to the file. Check my edited answer
– Romeo Ninov
7 hours ago
I'm new to ubuntu, so I have to search on how to make a script. After creating the script and tried to run it, I got an error that file is not readable or you don't have enough right. Any idea? Also, when I tried to enter it in cron, still nothing happened. I read that there is a command to start cron, I tried it, and still the script is not running Of course, I can still run the actiona program by adding a pause for an hour, but still that is not the optimal way, since the Actiona is still running while waiting
– Rudy Prawira
15 hours ago
I'm new to ubuntu, so I have to search on how to make a script. After creating the script and tried to run it, I got an error that file is not readable or you don't have enough right. Any idea? Also, when I tried to enter it in cron, still nothing happened. I read that there is a command to start cron, I tried it, and still the script is not running Of course, I can still run the actiona program by adding a pause for an hour, but still that is not the optimal way, since the Actiona is still running while waiting
– Rudy Prawira
15 hours ago
@RudyPrawira, check my edited answer. And do not forget to exec
chmod command– Romeo Ninov
10 hours ago
@RudyPrawira, check my edited answer. And do not forget to exec
chmod command– Romeo Ninov
10 hours ago
I've tried your edited answer, and I can run it in terminal. So thank you. The problem is that cron still won't run it, I tried some sample code (the one that display the date and time every minute) to test if my cron work, and it works. It confuses me that I can run the script from the terminal directly but not from cron. Can you help? Thanks
– Rudy Prawira
8 hours ago
I've tried your edited answer, and I can run it in terminal. So thank you. The problem is that cron still won't run it, I tried some sample code (the one that display the date and time every minute) to test if my cron work, and it works. It confuses me that I can run the script from the terminal directly but not from cron. Can you help? Thanks
– Rudy Prawira
8 hours ago
@RudyPrawira, add in your script line
set -x and redirect the output to the file. Check my edited answer– Romeo Ninov
7 hours ago
@RudyPrawira, add in your script line
set -x and redirect the output to the file. Check my edited answer– Romeo Ninov
7 hours ago
add a comment |
Rudy Prawira is a new contributor. Be nice, and check out our Code of Conduct.
Rudy Prawira is a new contributor. Be nice, and check out our Code of Conduct.
Rudy Prawira is a new contributor. Be nice, and check out our Code of Conduct.
Rudy Prawira is a new contributor. Be nice, and check out our Code of Conduct.
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%2f1133757%2fcrontab-not-running-actiona-command%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
At least actiona needs a directory in front of it. and
* * * * *is bad...– Rinzwind
17 hours ago