Tag Info

Hot answers tagged

3

I increased the number of files limits for everyone this way (segment from /etc/security/limits.conf): # - memlock - max locked-in-memory address space (KB) # - nofile - max number of open files (Doug: - so Samba will not complain) * - nofile 16384 # - rss - max resident set size (KB) # - stack - max stack size (KB) That was on ...


3

One problem is that you're trying to run a graphical application (notify-send) from cron. That takes a little tweaking. You need to set XAUTHORITY and DISPLAY variables in the crontab so that it can connect to your running X session and you need to set XDG_RUNTIME_DIR so it can connect to your pulseaudio session. Unfortunately, these need to be set in the ...


2

As you've probably seen in the comments to your question, the cronjobs in /etc/cron.hourly (and the other, similar directories) are executed by run-parts. run-parts is a little picky about filenames. By default it doesn't execute files whose filenames contain anything other than (all of those from ASCII) uppercase letters lowercase letters digits ...


2

I needed the same thing and was looking for solution. Apart from running gpg-agent, which will ask for the password only once (e.g. during boot) and cache it for next usage, I have found nothing. Problem is how to interact with interactive scripts, which are the ones, who ask for user input from stdin. Expect (apt-get install expect) solves exactly that. ...


2

Try directing the output to a log file. Just make sure that it exists and is writable by whatever user the cronjob is running as. (In my example, this would be cyphertite) I also recommend running date somewhere at the beginning of your script so that you get the date in the log file. 0 15 * * * /home/andrew/daily-backup.sh >> ...


2

I had to set the path to grunt - */1 * * * * cd /root/dev/myapp && /usr/bin/local/grunt serve


2

Joining commands with && means that the command on the right will only run if the one on the left was successful. This means that your crontab will fail the first time it is run since there is no zip file in /var/www/html/ so the rm /var/www/html/my-zip-file*.zip fails and the mv will not be executed. So, you can either create a file of the right ...


1

It could be leading to the solution that a domain member should not have more than 5 minutes clock skew. See http://download1.beyondtrust.com/Technical-Support/Downloads/files/pbiso/Manuals/likewise-open-54-guide.html#id2944830 I suggest the settings of Likewise make sure that this time difference cannot occur. A windows domain member would normally sync ...


1

It should work if you supply the full path for the ffmpeg and avconv commands. You can get this by running which, e.g., which ffmpeg. I don't have either of those programs installed on my server but I suspect that avconv is in the PATH used by cron while ffmpeg isn't.


1

Your commands are not working because /etc/init.d/smbd and /etc/init.d/nmbd have the following at the start: if init_is_upstart; then exit 1 fi So, as the init in ubuntu is now Upstart (/etc/init.d/ is from SysV), you need to run the start-stop scripts from the directory /etc/init/. /etc/init.d/ still exists for ...


1

Every user has it's own crontab. To see it just type crontab -l and, yes you've seen it right, when you want to add a crontab then simply do crontab -e for the first time you'll be asked about the editor to use with crontab. As you are a newbie as you say, I'd recommend to use nano, it's the simplest editor to use. The crontab itself works like this ...


1

What is the proper file to use and best way to do this? crontab -e is the best way to do it - this will allow you to easy edit per-user crontabs. If I schedule a task as my non-root user, will it run by itself at the time interval as specified, with no issues? Yes, and it will run with the privileges of that user account. As a principle, it is ...


1

What you need is a mechanism called flushing: forcing a process to write its output, which would otherwise remain buffered until completion. Shell scripts flush on a line by line basis. If you need the output of a shell script before the script is ended, make sure it contains a newline. Python programs can explicitly flush their stdout by calling the flush ...



Only top voted, non community-wiki answers of a minimum length are eligible