cron is a task scheduler based on clock time that runs on Linux-based machines.

learn more… | top users | synonyms

0
votes
0answers
10 views

CRON @reboot vncserver?

Is there any reason per-user cronjobs running vncserver @reboot wouldn't run? When I reboot the machine and look into /var/log/syslog, I see the jobs being run, then cron saying (CRON) info (No MTA ...
0
votes
2answers
53 views

Cron Job not running in Ubuntu 12.04

I created a cron job in my console in Ubuntu 12.04) by using crontab -e: 10 09 * * * /home/ram-pc/Desktop/bala/personal/dump.sh But it is not running. When I save it is installed correctly without ...
0
votes
1answer
154 views

Getting fcron and RVM work together

I'm trying to make RVM and fcron work together. Apparently fcron does not read directly or indirectly any sort of env variables. Which makes RVM futile and scripts fail. I have this script which ...
0
votes
0answers
9 views

Logrotate not rotating on file size

According to the man page "Normally, logrotate is run as a daily cron job. It will not modify a log multiple times in one day unless the criterium for that log is based on the log’s size". So, ...
3
votes
2answers
4k views

BASH - merge directories when using mv

I just started using BASH, so I can move all contents of a directory to another. But the issue is, I was expecting it to merge the directories. I am using cron job to run this script. #!/bin/bash ...
4
votes
2answers
85 views

Behavior of rsync with file that's still being written?

If Apache is in the middle of writing a large file and an rsync cron job runs on that file, does rsync attempt to copy the file? Example Apache-1: Has file large being written to /var/www. ...
0
votes
0answers
12 views

Trying to find dbus session, doesent work

Trying to use notify-send with cron, it needs dbus, what im i doing wrong? var= $(set | grep '^DBUS_SESSION_BUS_ADDRESS=') export DBUS_SESSION_BUS_ADDRESS=$var #!/bin/sh { ...
1
vote
2answers
3k views

How to auto commit to my git repository using cron?

I look into a lot of answers about this subject, but something is wrong here, let me explain. I create this script, to make my cron cleaner :) #!/bin/bash cd ...
0
votes
2answers
13 views

Install cron from console

Is there any way to do the crontab -e, save and exit from vim from the console directly? I realised that in order to make cron work with Docker, I should do crontab -e and save and exit, that is the ...
0
votes
1answer
69 views

Daily crontab with hg, git and svn

Hello I have made a script that updates some repos from git merc and svn, then updates a git repo. The script works manually but doesn't work in crontab, here is the script: #!/bin/bash cd ...
1
vote
2answers
352 views

Fail cronjob with /usr/bin/env

I have a script that works perfectly if I execute it from the command line manually. However, when it runs via cron, the job fails with the following error: /usr/bin/env: escript: No such file or ...
0
votes
3answers
2k views

“/usr/bin/env bash” is not found when running from a cron script

I have this in my crontab: PATH=/usr/bin:/usr/local/bin:$PATH */1 * * * * /usr/bin/env bash > ~/cron.log 2>&1 The ouput in cron.log is the following: /usr/bin/env bash: No such file or ...
3
votes
1answer
2k views

Two parts: linux startup script to connect to bluetooth and cron to keep it connected

I have a mini bluetooth keyboard and a Raspberry Pi running a Debian-based distro. I know the MAC address of the keyboard but for this question, let's just use AA:BB:CC:DD:EE:FF. Right now I have to ...
0
votes
0answers
37 views

Maintain screen session when executing shell script on boot

Solved: I solved this problem by introducing a delay before executing the script: @reboot sleep 60; /root/start_server.sh On Ubuntu 14.04, I have a crontab entry set to run on reboot: @reboot ...
0
votes
1answer
51 views

Cron won't run my root script

I am on Ubuntu 14.04 (using Digital Ocean) trying run a script as root. It's a script to check if a server is running and restart if it has crashed. The issue isn't the script, but crontab won't run ...
0
votes
0answers
17 views

Delete messages in Gmail “All”, “Incoming” or “Sent” folder

I use one Gmail account only for mail relaying from my home server to different accounts, to multiple users. The problem is that there are some thousands of emails on this account in the "Sent" and ...
0
votes
0answers
34 views

Not able to open crontab -l

I am running crontab -l to view the crons on a RHEL server(v5.10) and getting the below error: crontab: error while loading shared libraries: libaudit.so.1: cannot open shared object file: No such ...
0
votes
0answers
20 views

How do I launch a gui app from a script called in cron in Linux?

I understand that cron doesn't like launching apps that have a gui. I am trying to google around this, and I found that it is possible, but I need to tell cron which display to launch it in. Well, I ...
0
votes
1answer
20 views

Where is the default directory of saved files using wget in crontab?

I want to download some files using wget command in crontab. I use a text file to make a list of my desired urls. wget's -O parameter works well for setting a destination folder for single files, but ...
1
vote
2answers
217 views

Why echo $(crontab -l) outputs current working directory listing and only then the content of crontab file itself?

So if cwd is the /tmp now: crontab -l > #min hour day mon dow command > * * * * * /usr/local/bin/growlnotify -t 'helloTitle' -m 'helloMessage' -n 'myApp' -sw but: echo $(crontab -l) > ...
3
votes
4answers
2k views

rm failing inside cron script

I have a cron job calling a bash script which runs fine, except for one line inside it that is suppose to remove all fines in a directory. The result of this line is always 'no such file or directory' ...
0
votes
1answer
51 views

cronjob not uploading to FTP

i have a php script that should take a file from one web server and upload it on another, when i run the script through a browser it works fine. when i use this cronjob it doesn't upload. 51 14 * * * ...
0
votes
0answers
15 views

Emails from root while working with Horton Sandbox

I recently installed the VM for Horton Sandbox (CentOS 64) and I consistently get the notification: You have new mail in /var/spool/mail/root and when I go there I see notices of the form: 22 ...
0
votes
0answers
71 views

Correct crontab settings on Cpanel/WHM Cron on CentOS 6.5

I have recently migrated from collocation to Amazon EC2 and setup new WHM installs with CentOS 6.5 I then used the Transfer tool to move all websites to the new server, however I am trying to transfer ...
0
votes
1answer
18 views

install crontab every 10 minutes

I'm following the tutorial here on how to install a crontab every 10 minutes, but I'm running into an issue. My Cron is */10 * * * * /app/qa/dashboard/ec2/autoscaling-onesearch/manage check But ...
9
votes
6answers
45k views

How to stop a currently running cron job?

How can I stop a cron job which is currently running?
1
vote
2answers
85 views

SSH: Dismiss read mail messages from Cron

Whenever I ssh to my server box, I get 'You have mail' along with banner message. Then I type mail, and go through msgs, by hitting enter, until At EOF shows up, and when I do quit or ctrl+d, and ...
3
votes
2answers
2k views

Multiple crontabs for one user

is there a way to use multiple crontab files for one user? Thinking something along the lines of crontab file per project instead of crontab per user... Any help is appreciated...
1
vote
2answers
78 views

Restarting process in CentOS if server restarts

I have a VPS with some Java applications (made with "Play Framework") running on ports 9000, 9001, 9002 and 9003. VPS Provider (iPage) happens to reboot servers unexpectedly from time to time, leaving ...
0
votes
1answer
35 views

Cronjob etiquette?

I am a student at a relatively small university. I wrote a script that sends me an email when a math newsletter comes out, so I can get a head-start on the problem of the week. I plan to run it as a ...
0
votes
2answers
27 views

Write PID To File On Bash Execution

I'm executing a bash script via cron. I want to write the process id (PID) of the script to a /tmp/ file for reference, in case I need to kill it later on (this script can take 6 - 10 hours to ...
0
votes
1answer
37 views

Strange timing behaviour

I need to run a CRON each 5 minutes for a specific user example.com, the script executed is a php file. File : /var/spool/cron/crontabs/example.com /5 * * * * /usr/bin/php -f ...
-1
votes
1answer
69 views

Double pipe “||” not working in cron jobs

fellow SUers, I am trying to run a watchdog cron job to make sure a process is running (DreamHost keeps killing processes). I was inspired by this SU question. However, the double pipe || seems not ...
0
votes
2answers
41 views

Synchronized script execution across multiple servers

I'm looking to run an automated task (a shell script) on multiple Ubuntu servers at the same time with as much timing accuracy as possible. Ideally, I'd like the time discrepancy between the start of ...
0
votes
1answer
37 views

Can't create incron job

I am trying to create incron job, but no success. When I type: incrontab -l I got: no table for vujke and when I type: incrontab -e I got: editor finished with error: No such file or ...
1
vote
1answer
560 views

Background Jobs from cron

I am running a cron on every two minutes. From the cron I am running other shell scripts in background with "&". After cron exits spawned shell script process still runs, this is desired behavior. ...
2
votes
6answers
5k views

How to change wallpaper from command line in KDE 4.3?

Basically question is in title, but let's elaborate a bit: I have KDE 4.3 from Arch Linux. And a script which periodically downloads new wallpaper. So I'd like to set it as current wallpaper from ...
1
vote
2answers
10k views

How to create a cron job to upload files to an FTP server

I would like to create a cron job that uploads files from a directory on my computer to my FTP server. I would like it to do it daily at midnight. I know pretty much nothing about cron, so I ...
0
votes
1answer
28 views

Cron jobs on IBM i 7.1

I just found out today that on an IBM i system I am able to use SSH to get to a Unix-like terminal (AIX/PASE) and would like to use this to schedule automated tasks using crontab. Does anyone know if ...
0
votes
1answer
66 views

How to get crontab to run when backup requires a password

I am running a script to backup my postgres database on Debian. I am basically running exactly this: https://wiki.postgresql.org/wiki/Automated_Backup_on_Linux Now I have everything working fine when ...
1
vote
1answer
4k views

Running Cronjobs as per Local Time rather than Universal Time

On running dpkg-reconfigure tzdata in terminal and i get 2 different time on my machine Local time is now: Wed May 1 11:58:55 IST 2013. Universal Time is now: Wed May 1 06:28:55 UTC 2013. ...
1
vote
1answer
36 views

cron jobs set for different times, but execute at the same time

I have a file which I loaded into crontab with the following jobs, and crontab -l reports the following: # runs daily at 2:00 am and 2:05 am 30 12 * * * /usr/bin/wget -q -O temp.txt ...
0
votes
2answers
38 views

Why is this cronjob not working?

I have a ruby script in ~/custom_scripts/get_all_products.rb. I want it to run every night at 04:00. Here's what the cronjob in crontab -e looks like: MAILTO="<email>" 0 4 * * * ruby ...
0
votes
1answer
46 views

“echo” prints the options in crontab

I'm running Rasbian 3.12.26+ on a Pi model B. Here is what my cron entry looks like: * * * * * sleep 11; { echo -en "\e[1;4;33m"; date; echo -en "\e[0m"; curl -k "http://sampleurl.com/update.php"; ...
0
votes
1answer
14 views

How to execute a Linux Cron Job from day x to y on crontab?

I found that I can use an hour range by using a slash, for instance, 4-20 to run from 4AM until 8PM. But what about day range? Can I use something like: * * 5-20 * * CMD
9
votes
8answers
7k views

Error adding cronjobs in Mac OS X Lion

Until now, I have never attempted adding a crontask on my Mac. To my surprise, it threw an error.. [hayek@mac:/www/] 02:33:22 PM: crontab -e ...
0
votes
3answers
498 views

Windows app to grab webcam snapshots?

I want to periodically capture an image from a webcam attached to a Windows PC, and upload it to a Linux server on the network (preferably FTP, could be SFTP or even Samba). The images have to be ...
0
votes
1answer
626 views

Crontab is using some sort of hidden cache?

I used to have a crontab that ran like this * * * * * /usr/bin/php /var/www/vhosts/default/htdocs/agent/time_keeper.php > /dev/null 2>&1 It worked fine. Now I moved that php script to a ...
0
votes
2answers
47 views

Is there any reason this cronjob would fail in cron, but not on the command line?

I have written a little one liner that will email me when a list of files changes - I used sha512 to generate a list of hashes and then periodically check that those hashes still match. */5 * * ...