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)

0
votes
0answers
25 views

Why does my Ubuntu server shut down the MySQL connection the same time every night?

At the same time every day (around 10 PM EST) my MySQL (now MariaDB) server goes offline and my sites crash. I can't for the life of me figure out why. When I look in the syslog I see that there are ...
0
votes
0answers
17 views

How to automate these cleanup commands using bash(?) [duplicate]

I wanted to know how to automate these commands: echo "Cleaning Up" && sudo apt-get -f install && sudo apt-get autoremove && sudo apt-get -y autoclean && sudo apt-get ...
1
vote
2answers
53 views

Why cron adds question mark after log file name

I have created cron task using crontab but I get question mark at the end of log file name. */4 * * * * /usr/bin/php /path_to_cron/queue.php > /path_to_log_file/queue.txt Is there any way to get ...
0
votes
1answer
44 views

Why isn't this cron job working?

I am using Ubuntu 14.04 and have created in the the following script inside /etc/cron.hourly and made it executable filename: remove_old_tmux_resurrect_saves #! /bin/bash ls ~/.tmux/resurrect/* ...
0
votes
1answer
61 views

Why do variables set in my /etc/environment show up in my cron environment?

For a long time, I have been used to thinking that any environment I wanted in cron, I basically needed to set in the crontab itself -- see the "Different Environment", likely top answer here: Reasons ...
2
votes
1answer
43 views

Stop infinite notifications display

I wanted to schedule a job to run at a specific time just once. So, I used the at command: at now -f /path/to/task.sh Now, in the task script, I wrote code to display notifications using ...
0
votes
0answers
30 views

How to use Mutt as the mail transport agent used by crontab?

I am using Mutt to send emails from my server. Using the MAILTO variable to send the result of running crontab tasks is not working as it seems that it expects to find /usr/bin/mail. This is the ...
0
votes
1answer
16 views

Anacron can't read ssh keys?

I've set anacron under the non-root user as follows: mkdir ~/.anacron cd ~/.anacron mkdir cron.daily cron.weekly cron.monthly spool etc My anacrontab in ~/.anacron/etc: # /etc/anacrontab: ...
2
votes
2answers
144 views

Can't access shell variable in crontab configuration

I have problem in accessing a shell variable while running cron job. Actually i created a job which prints two shell variable values into a env.output file. I am writing cron job using command $ ...
2
votes
1answer
53 views

awk command unable to read apache log file (user error)

Stumped by this one: less, cat & grep are all able to list the content of an apache log file "/var/log/apache2/other_vhosts_access.log". But when I use awk to grab the last 5 minutes of the file ...
0
votes
0answers
41 views

Using csync to sync through SFTP from crontab (needs to, but doesn't use my .ssh/config)

Running the sync manually works: /usr/bin/csync .bak sftp://sftp-machine-dog@ram-htpc/bak And it gives csync.lock - Creating lock file: /home/kent/.csync/lock csync.lock - Create temporary lock ...
0
votes
1answer
230 views

Syntax error: EOF in backquote substitution

I scheduled following cron job: root@alexus:~# crontab -l | grep ^\@hourly @hourly OUT=`/usr/lib/nagios/plugins/check_disk --include-type=ext4 --warning=10% --critical=5%` ; if [ $? != 0 ] ; then ...
0
votes
1answer
95 views

LuckyBackup scheduled backup does not work

I am using luckyBackup 0.4.8 on Kubuntu 15.04. I created a profile to backup my data files. When executing the profile manually everything works fine. I also created a cron schedule to execute the ...
1
vote
1answer
50 views

Blender GPU rendering works from command line but not in crontab [duplicate]

I would like to schedule blender renderings with GPU support. I have created a bash file rendering.sh to do the job. I have scheduled it with sudo crontab -e. * * * * * sleep 0 ; sudo ...
0
votes
1answer
48 views

Daily Cron job not executing

I created the following cron job under /etc/cron.daily/backup-vivashost #!/bin/bash DATE=`date +%Y%m%d` mkdir /var/lib/html-backup/www-$DATE/ cp -R /var/www/html/* ...
0
votes
1answer
45 views

Using KCron in Kubuntu 15.04

I tried to install KCron in Kubuntu 15.04. I could find the package in Muon but after installing it I can't find it in the application menu. Also I can't start it by running "kcron" in the console. I ...
0
votes
1answer
21 views

Which backup package can meet these requirements?

I am looking for a decent, simple to use snapshot package. It should accomplish the following: store several profiles for different jobs (ex. /home part, /root part, ) linkable to cron for daily ...
0
votes
1answer
64 views

Run cronjob in Ubuntu 14.04 Server

How can I run crontab in Ubuntu 14.04 server? I am using CodeIgniter PHP framework. I get some code from here and tried this: */5 * * * * wget -q http://IPADDRESS/ws/cronjob/index But this is not ...
0
votes
1answer
28 views

Why my cron Job does not work?

Here is my cron job: */10 * * * * export DISPLAY=:99 #this is to open a port by Xvfb */10 * * * * python Crawler.py #this file will use a selenium to script the data through firefox browser. ...
0
votes
1answer
63 views

@reboot works with command but not script - Cron

So I am trying to run a script as a specific user @boot. I have come across using @reboot in conjunction with crontab. I have found that @reboot is supported by both the user and root via @reboot ...
0
votes
0answers
12 views

Can't seem to get crond to run

Three different production server running Ubuntu Server 14.4. Two are doing wonderfully... but one, does not run cron at all upon bootup. The only thing that launches it is "sudo cron" after the ...
0
votes
0answers
35 views

run once at boot, login then logout

I can´t get PIA VPN to run until I login So, from a Wake on lan start, how would I get the machine to login (which will make PIA start) and then logout again, or wait till lock will do. Ideally I ...
0
votes
1answer
44 views

Cron job not working

I have a script at ~/.sst/cmd.sh. It takes screenshot and saves after creating a date heirarchy of folders. Here's Content: #!/bin/sh mkdir -p --mode=0755 /home/username/.sst/rslt/$(date +%Y)/$(date ...
0
votes
1answer
216 views

Unprivileged LXC Container fails to boot on startup with 'call to cgmanager_create_sync failed'

I have some issues trying to start an unprivileged LXC container in my machine. $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.3 LTS Release: ...
1
vote
1answer
328 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 ...
11
votes
2answers
700 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
111 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
27 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
19 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
218 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
188 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
81 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
124 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
39 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
50 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
33 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
265 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
90 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
404 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
134 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
74 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
102 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
85 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
91 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
28 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
74 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
33 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
56 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
201 views

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

I have creates a cron job to take a backup of local MongoDB. When I execcute crontab -l command I see following: * */1 * * * cd /home/user/shell-scripts && sh mongo-backup.sh I previously ...