Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
Following is my cron on Ubuntu 16.04. I tried running the script manually and did not get any error but it won't run automatically. Can anyone tell me where I'm going wrong.
*/1 * * * * http://app.example.com/dosomething/example_method
P.S. I want the script to run on its own every 1 minute.
You seem to be missing the command to execute. Perhaps you want something like the following.
curl http://app.example.com/dosomething/example_method
Also, cron jobs that generate output or an error message and send it by mail, so check the email of the account under which the job is scheduled to run, so see what the problem is.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I need put a script file and a line in crontab in 1200 Linux servers.
How could I do this task automatically ?
Many many options!
write a script that connects via SSH to each of those servers, and have it create your script file & modify crontab!
use Ansible!
use SaltStack!
use < some other configuration management framework >!
Seriously though, are you suggesting you are in charge of 1200 servers and the usual procedure of doing, well, anything is by hand? Flabbergasting!
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
When I create a cronjob with user root it get runned al fine. But when I switch to user Apache and create a cronjob it doesnt run.
What could cause this? I was thinking about so permission issue maybe but can't figure out what.
The issue is that cron tries to switch to the user's home directory before executing anything and home directory no exists.
You must create the directory.
A better solution is execute cron with sudo:
15 1 26 * * sudo -u apache /usr/bin/php /var/www/html/nextcloud/occ files:scan --path=1645FC94-D50C-4E40-B941-38CA3B88EC0F/files/ExternalStorage
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
How to run shell script when XServer is started and lightdm also. I tried with init.d and rc.local in /etc directory, but my script is calling an gui application so that the reason I need to run it after XServer is started.
I am using Debian Jessie.
According to this link .xinitrc in your home directory will be read and executed, otherwise the default /etc/X11/xinit/xinitrc is used. So you should be able to create this file and have the shell script started.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I've spent last few hours looking for a solution for my problem which is:
I have my home server set up next to me with a small monitor attached to it. What i want to do is i want to create an additional user called "monitor" that executes command "nethogs eth1" straight after it has been logged one locally on the machine, and does not allow to turn off the script.
Basically i want nethogs running 24/7 on my monitor, without way to turn it off.
Please help me if you know the solution.
sudo adduser monitor
echo "sudo -u monitor nethogs eth1" >> /etc/rc.local
Each time your machine boots, it will execute nethogs eth1 as user monitor, and only root or monitor itself can stop that command.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Hello guys I just started to use Ubuntu and Ubuntu Server, I'm stuck using the at command.
Don't know how to initiate the command. This is what I'm trying do to:
I'm trying to run this file at 5 AM using the 'at" command
/etc/holler.sh
Thank You In Advance!
You should be able to do that with at -
1) Install at
sudo apt-get install at
2) Schedule your command
at 05:00 /somePathTo/someCommand