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
10 views

Creating a script for modifying several users crontabs

OK, so I run a seed-box like local machine with Ubuntu 14.04LTS setup with multi-user rtorrent/rutorrent. I installed that through a script that also installed crontab entries for each user so ...
3
votes
3answers
10k views

How to use wget with GET parameter, or redirect web?

sorry,.. I'm noob in Ubuntu ... and I'm trying to make a robots for downloading file.. i can download the zip file via web browser's address bar like this http://www.mysite.com/getFile.php?mirror=1&...
13
votes
3answers
20k views

How to run crontab as user:www-data?

My LAMP is setup to work as user:www-data and all files and folders are created with that permissions. I have setup for crontab as user@ubuntu. So i do crontab -e and use this command: */5 * * * ...
0
votes
1answer
14 views

I can't backup mongo with mongodump and cronjob

* * * * * /usr/bin/mongodump -d mydbname -o /home/ubuntu/backup/`date +"%Y%m%d"` Anything wrong for this cronjob? What can I do and check? I can run with correct result, tried with root and normal ...
2
votes
1answer
26 views

Cancel and restart a certain Routine (python-script)

I have a question regarding a programm I run. Every once in a while, I need to restart a certain program. For that case, I usually run: screen ./run.sh arg1 arg2 "arg3" (screen, since I don't know ...
1
vote
1answer
18 views

How do I format custom crontabs in /etc/cron.d/?

My understanding is that I can add system jobs with simple schedules to /etc/cron.hourly/, /etc/cron.daily/ and so on, and system jobs with custom schedules to /etc/cron.d/. But in a large IT ...
0
votes
1answer
17 views

Cron Script to run every 5 minutes

How would you use a cron deamon to execute a scheduled command such as gathering memory usage and adding that information to a file called /tmp/memory.usage, but only runs on Monday through Thursday ...
1
vote
1answer
17 views

How to manage /var/mail/root file

The size of /var/mail/root has been increasing as i am using lot of cron jobs and may cause memory shortage. Is it wise to delete that file? How to manage this problem?
2
votes
1answer
33 views

Working with cronjobs, bashscripts to automate MySQL backups

I am currently setting up a system which uses a MySQL database. I want to create automated backups which run every evening at 10:00PM and also keep the backups for 30 days. I know there is a way ...
1
vote
2answers
28 views

How to log output of apt-get upgrade to .txt file

How do I log the output of apt-get upgrade to a .txt file. I read the man page and the -q option mentions formatting the output for logging. The reason I am asking this question is because I would ...
-2
votes
2answers
35 views

How to set up a cron job to run every 10 minutes? [duplicate]

I have a python script, and i'd like to make it run every 10 minutes, how can i do this? Thanks in advance.
0
votes
2answers
248 views

Start-up / Reboot scripts for different users

I'm still trying to learn a little more about bash scripting and start-up / reboot, I have read about crontab @reboot and also just looking at other options but I just wondered if someone could maybe ...
0
votes
1answer
36 views

Crontab runs /etc/init.d/ scripts but won't run service restart?

I am very new to Linux so please bare with me. I'm writing a script to restart mysql and send me an email whenever it goes down. I'm using crontab to run the script every x minutes. I'm having an ...
0
votes
0answers
16 views

Halt the server daily at a specific hour [closed]

I have a CentOS 5 server, I want it to halt DAILY at 21:00 and wake up DAILY at 8:00 For the wake up I did it in the bios, but for the halt I want to configure it through cron. How to do it with SSH? ...
-1
votes
0answers
24 views

scripts in /etc/cron.hourly not executing

I have placed my mysql backup script in /etc/cron.hourly, i even made it executable and also the script starts with the line #!/bin/bash. But when i run sudo run-parts -v /etc/cron.hourly my backup ...
0
votes
2answers
48 views

Python script in CRON is not running in AWS ubuntu 14.04 instance

I want to schedule a CRON job into AWS Ubuntu instance. I have a simple cron sample like the following: import pandas as greatPanda import pprint import uuid df = greatPanda.read_csv('/home/soumik/...
0
votes
2answers
26 views

Script to backup Mysql database onto amazon s3

Can someone explain the script for backing up of Mysql database onto amazon s3?Script
0
votes
1answer
13 views

Trouble taking auto backup of mysql database to amazon s3

I am new to this concept and i am using ubuntu14.04 lts O.S. I created a bash script which would take backup of mysql db, and also created a cronjob for a desired time. The thing is the backup is ...
0
votes
2answers
30 views

Automatic backup of Mysql database to Amazon s3 server using script and crontab

I am new to this concept so can someone please guide me the script code details and the proper usage of crontab while backing up database to amazon s3 server at a desired time. I went through ...
3
votes
1answer
88 views

How to fix “Bad minute” error while installing a new crontab

I'm very new here, I've installed a fresh Ubuntu 16.04 lts to replace my windows OS. I'm tring to setup cronjobs to run mangento 2.1 via Ampps softaculous. The software has been successfully ...
1
vote
1answer
52 views

How to avoid password request for sudo for crontab scripts?

I need that a new user could execute sudo without any request of password, because this user has in crontab a .sh that uses sudo for some commands. I created a new user on my ubuntu server 16.04 x64 ...
22
votes
5answers
91k views

Verify if crontab works

I want to verify if a certain crontab works properly. I have added a job like this: */2 * * * * /path_to_my_php_script/info.php >/dev/null 2>&1 I know that i redirect to the null device,...
0
votes
0answers
16 views

Screen br tightness script will not run in crontab

My laptop periodically turns on at full brightness, despite the previous setting. As a quick fix, I made the following script which works just fine if I run it manually: #!/bin/sh /usr/bin/...
0
votes
0answers
30 views

upload local files to ftp server in a cron

I want to backup a local folder to a distant ftp server daily. Files in that folder should not be duplicated at backup-destination. Any file older than 1 month in both local and server should be ...
1
vote
1answer
37 views

Set up of 'sendmail' headers for cron jobs (crontab-user@mydomain.xyz)

I use Ubuntu 14 on AWS EC2. I have a non-root user crontab. Upon cron job completion, an email is to MAILTO address, as set in crontab. The email sender looks like this: root@ip-111-11-0-11.us-east-...
6
votes
1answer
296 views

Cronjob script not being executed

I have installed a cron job to run at 4 AM every day however it is not being executed. If I run the script manually it executes with no problem so I don't think permissions are the issue. I checked ...
1
vote
2answers
385 views

confusion about cron and anacron (setting up backup schedule for rsnapshot)

I am trying to set up a not too complicated backup schedule with rsnapshot on a laptop running Ubuntu 16.04 LTS. The plan is to retain two daily backups and 24 hourly backups. I think this is the ...
1
vote
1answer
29 views

Resetting crontab file to default

I've previously set a file to be crontab source file with crontab filename. How can I set it back to use default source? (the one that is modified with crontab -e) Thank you.
278
votes
40answers
445k views

Reasons why crontab does not work

Often, crontab scripts are not executed on schedule or as expected. There are numerous reasons for that: wrong crontab notation permissions problem environment variables This community wiki aims ...
2
votes
1answer
68 views

Is TRIM enabled/supported for this eMMC?

I have a compact SoC (System On a Chip) Dell laptop with the DF4032 SanDisk eMMC 32 GB storage device soldered to its only PCB, and there is no information concerning TRIM support for it anywhere. The ...
0
votes
1answer
36 views

Cron - Check if enabled on boot

I have a script and configuration file. Configuration file contains information about if script will run or not (enabled or disabled). If enabled, script must run in predetermined intervals. I ...
0
votes
0answers
22 views

mysqlcheck error (when repairing databases)

MySQL hangs when i`m repairing databases in CRON with command: mysqlcheck -A --auto-repair -u root -p'[my_long_password]' Syslog shows: Jun 29 15:03:01 karsis CRON[4118]: (root) CMD (mysqlcheck -A ...
0
votes
1answer
61 views

Cron job to set screen brightness not working in ubuntu 14.04

In the terminal, I ran: crontab -e Then I added the following cronjob in the file 26 21 * * * /usr/bin/xbacklight -set 80 This was supposed to set the brightness to 80% at 9:26 PM. But its not ...
0
votes
2answers
1k views

How can I get mysqldump to use the credentials from mysql_config_editor in a crontab-executed script?

I am setting up a daily backup of a MySQL 5.6.14 database using mysqldump on an Ubuntu 12.04 Precise server. I created the credentials file in the root home directory (.mylogin.cnf) according to the ...
4
votes
1answer
26 views

ps inside crontab is not seeing a running process

I have this robot worker.py, which I just run as: python worker.py --details There are many problems surrounding this robot, so it keeps going down each 30 minutes. When the robot is running, ps ...
1
vote
0answers
29 views

At job doesn't stop?

I'm trying to schedule a job on Ubuntu using at command: /opt$ at now + 1 min warning: commands will be executed using /bin/sh at> echo "test" > /opt/t.txt at> <EOT> However, the ...
2
votes
2answers
56 views

Auto delete files older than 7 days

I am a complete noob at linux but I am starting to get the hang of it. I have an Ubuntu Server 16.04 running an FTP server to backup security video files. The files will be stored in folders like: /...
280
votes
5answers
439k views

How do I set up a Cron job?

I want to schedule a task to run on a regular basis and have heard that Cron is the way to do this. How do I add Cron jobs in Ubuntu?
0
votes
0answers
25 views

Crontab not working with AWstats

A few weeks ago AWstats ceased updating the static web pages. I hadn't touched anything at all. I am a newcomer to shell but have got to the point where I can find my way around with a few basic ...
0
votes
0answers
23 views

Problem with non-root users crontab and CLI PHP

I'm stuck with the following problem and cannot seem to resolve it and would like some help if possible... I have created a user (lets call it user) and have edited the crontab for that user and have ...
354
votes
5answers
688k views

Where is the cron / crontab log?

I want to verify if my cron job is executing and what time. I believe there is a log for my sudo crontab -e jobs, but where? I searched google and it I found references to look in /var/log (...
1
vote
0answers
15 views

Can't connect to server through SSH after rtcwake reboot

I used crontab to create an rtcwake command to shut my computer down at midnight, and start it up at noon. The problem is, once it turns off, and then on again, I can't connect to the server through ...
5
votes
5answers
30k views

How to remove or delete single cron job using linux command?

I have created cron jobs for my site which is listed below and they are working fine. I print all cron job by using this PHP script: $cronfiles=exec('crontab -l',$output); echo "<pre>"; print_r(...
1
vote
2answers
63 views

Cron Job doesn't execute

I created a cron job as root with the command: crontab -e Then I added 0 4 24-31 * 4 /home/backupscript.sh after the last line. The output of crontab -e looks like this: # Edit this file to ...
0
votes
0answers
20 views

Crontab script error

I edited a crontab with the command sudo crontab -e and I inserted the line */1 * * * * /home/user/Desktop/bt.sh >> /home/user/logroot.txt 2>&1 The script contains: #!/bin/bash pkexec ...
1
vote
0answers
34 views

Send file through bluetooth crontab

I want to send a file named read.txt using command: bluetooth-sendto. It works using the direct command on terminal bluetooth-sendto --device=MACADDR path/to/read.txt. I want to execute it with this ...
1
vote
1answer
52 views

SSD as /tmp partition

I have a Ubuntu 14.04 server which has one drive where rootfs is mounted. I just added an SSD disk which I have mounted at /ssd Now I want my /tmp & /var/tmp to use this fast drive to speed up ...
1
vote
2answers
116 views

Hibernating from cron

I am trying to hibernate from cron using the command systemctl hibernate. However, I am getting the following error: Failed to set wall message, ignoring: Interactive authentication required. ...
4
votes
3answers
501 views

Cron jobs are disabled on clean installation of 14.04

I have a clean installation of Ubuntu 14.04 and in my /etc/cron.daily/ I see *.disabled files: -rwxr-xr-x 1 root root 15481 Apr 10 09:04 apt.disabled -rwxr-xr-x 1 root root 314 Feb 17 2014 ...