Cron is used to execute scheduled commands. It acts as a task scheduler on Linux and UNIX systems which will execute commands at specified times set by the user. Cron has a great deal of customization and is often used on server environments where common tasks are run on a regular basis.

learn more… | top users | synonyms (2)

1
vote
1answer
956 views

Use crontab to restart an Upstart service on schedule?

I need to restart shiny-server (Upstart service) on Ubuntu 12.04 on a routine schedule. Typically, if I want to restart this service manually, I simply type: sudo restart shiny-server or service ...
12
votes
2answers
746 views

Announce the time on the hour?

On the mac there is a feature which allows you to get your computer to verbally announce the time on the hour, is there something similar on Ubuntu? That is is there a package which already does this ...
1
vote
1answer
141 views

How to use Incron and date?

I have the following code: /var/www/html/wp-content/uploads/2015/09 IN_CREATE,IN_CLOSE_WRITE /opt/imageopt$ how can i set the "/2015/09" part to todays date? Thanks,
0
votes
0answers
30 views

detect whether block device (drive) has been read from

So, since hdparm doesn't really work for some obscure reasons with my SATA drive when I want it to spin down the drive after X minutes, I've been searching for alternative options and found one using ...
0
votes
0answers
21 views

looking for a nagios or ruby expert to help me get away from bad bash practices

Granted the problem: I want to; mount, copy files, and unmount; automagically when drive is connected, I see the following 2 options (i'm sure there are more concise ways I'm not aware of).. maybe ...
1
vote
1answer
470 views

Docker is managed via upstart, try using service docker

I'm using following system: root@alexus:~# cat /etc/issue.net Ubuntu 14.04.3 LTS root@alexus:~# uname -a Linux alexus 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 x86_64 ...
2
votes
1answer
201 views

What is the cron file of three times per month, from 3-5 pm?

I want to run a job three times per month from 3-5 pm. Hence, I should add a line to /etc/crontab which satisfy those needs. How do I add this line known that I try the following, and it seems ...
0
votes
0answers
129 views

`/usr/sbin/apache2 -k start` eats lots of memory

When I do ps -aux in my server, I get the below output. It seems apache eats lots of memory. What is causing this? I am running 3 cronjobs every minute in php. Is that causing this? www-data 1397 ...
3
votes
1answer
146 views

Save only specific output to log file

I'm using unison to synchronise data to a server, and I've recently created a cronjob for this. The cronjob is running at startup and saves the output to a log file. (additional info below). The ...
0
votes
1answer
54 views

arecord does not work with crontab

I am having a problem with cron job recordings. I can run arecord from tcsh scripts as the same user as the GUI from a terminal, but it will not run from crontab. The crontab user is the same as the ...
1
vote
1answer
58 views

How do I identify which log is incorrectly rotated?

I'm receiving email prompts from two Ubuntu 14.04 servers around unusual logrotate behaviour. I don't have any packages installed which are not installed on other servers which don't exhibit this ...
2
votes
1answer
40 views

how to do an on-change one-way sync/backup between folders on primary drive to secondary drive?

I have two HDs in my machine. All of Ubuntu is installed on the main drive. The 2nd HD is empty and is for backup purposes. I want to configure a one-way sync/backup of /home/* to the 2nd HD. I know ...
1
vote
1answer
373 views

Ubuntu 14.04 randomly freezes after long periods and fails to reboot automatically (crontab)

For some time now I've been having problems with my ubuntu 14.04 installation on my assembled pc. The main component is the motherboard, an ASRock Q1900M Pro3, 4gb ram, and two pci sata controllers. ...
0
votes
2answers
195 views

Backup with rsync works but not in crontab

Using this command in rsync: rsync -azvh pi@192.168.1.45:/media/PNY/video /home/john/Desktop/Pi\ Videos Works flawlessly. Now, when I put this command in crontab to run every 15 minutes, it does ...
0
votes
1answer
648 views

How is trim enabled in Ubuntu 15.04? [duplicate]

Does it work once a week or does it continually trim the system? I have seen answers for this but they refer to Ubuntu 14.04 but not to Ubuntu 15.04
0
votes
0answers
173 views

Java JDBC: Connection Timed out - Executing a jar file in shell script scheduled as cron job

I have a requirement of updating a db data. Db is stored on a remote server. I am using an executable jar file that connects to this db using JDBC and parses locally stored files and updates the db ...
0
votes
0answers
77 views

Cron Jobs shut down times

My cron job looks like this in Ubuntu 14.04: 00 2 * * 1-5 /home/ritzie/dm_hibernate.sh 00 2 * * 6,0 /home/ritzie/dm_hibernate.sh So during the week it comes on at 5pm and boots off at 2AM. On the ...
4
votes
1answer
128 views

Ubuntu touch and cron jobs

I created a script to enable flight mode at night and disable it in the morning. I'm adding checks to avoid enabling it if there is phone of web activities. The script has been added to cron (5 minute ...
1
vote
1answer
123 views

How to configure a script to start automatically after server reboot

I want to configure a script to execute automatically when a server is rebooted. Currently I need to start the script manually after server reboot. I am using Amazon Linux server. I was able to ...
0
votes
3answers
143 views

Cron Wont Run - Ubuntu Server 14.04

So I've created a backup script that tar's up files, rsyncs them to a remote server, and removes the tar afterwards. I've manually tested the file and it runs, however I cannot get it to run via cron. ...
0
votes
1answer
26 views

How can I find all the possible cron settings?

I recently discovered that cron (at least on Ubuntu 14+) supports a setting called CONTENT_TYPE where I can specify the content type for emails like: CONTENT_TYPE="text/html; charset=utf-8" On ...
1
vote
0answers
40 views

restarting custom kiosk service with cronjob

I have a google chrome kiosk set on top of Ubuntu Server 14.04.3. What I want to do is to restart the kiosk every day at midnight. As a test I set a cronjob to restart the kiosk every minute in order ...
0
votes
1answer
127 views

Running a jar file at boot with cron and seeing output

I'm setting up a jar file to run at boot. I have a script to run it with, and that script is configured to run at boot in using @reboot in cron. I have a bare CLI interface for the moment, with no ...
0
votes
0answers
45 views

Cognos Transformer is not running through crontab scheduler

I am new to this cron tab scheduler and i have a Cognos BI which is installed on Linux . I am running cube in cognos using the transformer, as a part of scheduling the process i have written the ...
0
votes
0answers
72 views

Two processes (top and irssi) should run in screen @reboot (via crontab). One does, the other does not?

This is in my crontab: SHELL=/bin/bash PATH=/usr/sbin:/usr/bin:/sbin:/bin @reboot (/bin/sleep 60; /usr/bin/screen -dmS irc /usr/bin/irssi) > /tmp/irssi.log 2>&1 @reboot (/bin/sleep 60; ...
0
votes
1answer
412 views

Why my cron job is running every minute when it is scheduled to run every hour?

I have a script that creates a cron job to take a backup of a local MongoDB. When I execute crontab -l command, I see following: * */1 * * * cd /home/user/shell-scripts && sh mongo-backup.sh ...
0
votes
1answer
195 views

“rm: not found” by apt, cron and others

For some reason I get this error all the time in system scripts: rm: not found For example I wanted to update the system: Setting up install-info (5.2.0.dfsg.1-6) ... /usr/sbin/update-info-dir: ...
0
votes
0answers
134 views

Is there a way to schedule youtube-dl download?

If that's not possible, should I go by adding a crontab entry? I can't think of anything else I'm kinda newbie.
0
votes
0answers
57 views

How to turn off/on volume in crontab?

How to turn off/on volume in crontab? I added the following in crontab in vain: # Turn off/on volume at night/morning 00 0 * * * /usr/bin/amixer -D pulse sset Master 0% 00 8 * * * /usr/bin/amixer -D ...
0
votes
0answers
298 views

ProFTPD killed (signal 15)

yes, I've googled a lot and nothing that I've found worked for me. I'm encountering the problem with ProFTPD as follows (taken out of the logfile): Sep 11 18:17:19 /host/ proftpd[12955] /host/: ...
1
vote
1answer
85 views

Rsync full backup --exclude option not working

I run the following command as sudo everything works fine: rsync -aAXv --delete ...
0
votes
0answers
115 views

Question about reboot after dist-upgrade

I have cronjob running a nightly apt-get update & apt-get dist-upgrade task, when I log in to the server over SSH I'm getting a message that it has to be restarted. I thought the server only had ...
1
vote
0answers
36 views

Execute fstrim weekly with a user-set crontab [duplicate]

I am currently using Ubuntu 15.04. My Linux experience is limited. I would like to execute fstrim weekly. Ubuntu already has a script set up in /etc/cron.weekly/fstrim, but it does not do exactly ...
0
votes
0answers
79 views

ubuntu 14.04 qdbus in terminal list more services than when I run it in cron

In xterm qdbus shows: ~/bin$ qdbus :1.0 com.ubuntu.Upstart :1.1 :1.10 org.freedesktop.ScreenSaver org.gnome.SettingsDaemon org.gnome.SettingsDaemon.Keyboard org.gnome.SettingsDaemon.Power ...
0
votes
0answers
88 views

Cron job not finishing

I have a custom Python script set to run with Cron on a 3-day per week basis. The job runs great, up until a certain point. The job is supposed to ZIP certain directories on my media server, and place ...
0
votes
0answers
68 views

failed to open fifo for logging: No such file or directory

I have Ubuntu 14.04.2 LTS (GNU/Linux 3.16.0-43-generic x86_64) Installed nginx, php5-fpm, work web site. In syslog more error fifo, what is it? Aug 28 12:17:01 ubuntu-server CRON[30921]: (root) CMD ( ...
0
votes
1answer
60 views

Lock crontab / make it write-protected

I am currently trying to build a thin-client with a Raspberry Pi 2 based on Ubuntu MATE 15.04. I needed to write a command in the user's crontab (mate-session-save didn't work with root's crontab) and ...
0
votes
0answers
66 views

logrotate broken after security breech

I downloaded a PDF which evidently had Linux malware, which executed when I ran the PDF through firefox, or atril, Im not sure which. I figured it out shortly after running clamav, and I believe ...
0
votes
0answers
9 views

How to get a list of currently running crob jobs? [duplicate]

How can I identify what processes started by cron are running right now?
1
vote
2answers
65 views

Cronjob bashscript help

I've looked through a bunch of cronjob troubleshooting guides, but I can't seem to find what I'm doing wrong. This script runs just fine if I run it manually. Running it from crontab just isn't ...
0
votes
0answers
77 views

how to auto login magento in terminal?

Currently I am trying to get customers data from magento. It was working fine, when run in netbenas (Shift+f6). (I make the magento admin as auto login using the following link). admin auto login: ...
0
votes
0answers
131 views

Run apt-get dist-upgrade from cronjob

I'm using a 64 bit Ubuntu 14.04 headless server & I thought I had configured cronjob to automatically download updates by editing the /etc/crontab file & adding this. 0 23 * * 3 root ...
1
vote
1answer
288 views

Schedule shell script to display output in terminal

I have added a shell backup script to crontab, and it seems to run every night, but I currently need to check the target to see that it's worked. What would be much more helpful would be for the task ...
0
votes
0answers
38 views

how to run python file again and again in ubuntu? [duplicate]

I am new to ubuntu . I have a python file . i just want to execute it in every 15 min . any body can tell, how i can do it ? with all basic steps Thank you
1
vote
0answers
23 views

Schedule command during shutdown? [duplicate]

How do we execute a command such as it executes everytime one logs out or shutdowns or restarts the machine ? To be more specific, I want the autotrash to be executed at logout, or shutdown or ...
0
votes
0answers
150 views

Is it safe to delete ntpdate from /etc/cron.daily?

As I understand ntpd effectively replaces ntpdate. I had an admin mail that showed: /etc/cron.daily/ntpdate: run-parts: failed to exec /etc/cron.daily/ntpdate: Exec format error run-parts: ...
1
vote
1answer
38 views

Crontab works incorrectly

I have a job set to run as per below cron schedule 0,15,30,45 * 8-17 * 1-5 However, instead of running only on Mon to Fri and only from 8th to 17th of the month, this job runs every 15 mins ...
0
votes
1answer
46 views

how to disable predefined cronjob?

Is it safe (or is there a better way) to disable a cronjob that came with Ubuntu than to just remove the respective file out of the cron.* directory? In this particular case, I want to deactivate the ...
3
votes
1answer
394 views

Script running from terminal but not in crontab

My problem is the following: I've made a script called copy.sh in the /var/etc folder in order to copy some .cfg files from there to myfiles #!/bin/bash SHELL=/bin/bash ...
1
vote
2answers
145 views

Cron executes old version of script

I defined crontab job by means of: sudo crontab -e As I can see it is listed when I type: sudo crontab -l and it's listed as well when I type: run-parts --test /etc/cron.monthly Than I ...