Cron is a job scheduler that allows users to run commands periodically.

learn more… | top users | synonyms (1)

0
votes
1answer
247 views

How to check whether my cron job for backup using tar was succesfull [closed]

I have a cron job to tar backup websites and databases and upload the backup to a NAS. Instead of checking the tar files on the NAS. Is there any way to check if the tar backup process completed ...
1
vote
1answer
139 views

How to respawn vpnc when it stops?

As root, I've setup a crontab rule that launches vpnc everyday early in the morning (before I arrive at my workplace). But it often occurs that the vpn stopped mid day. As a result, I have to sudo ...
1
vote
0answers
123 views

wget command not working in cronjob

here is my command : wget -c -O /home/alireza/Desktop/1.mkv http://mysite.com/myfile and here is my /etc/crontab file : SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ 0 2 ...
2
votes
1answer
82 views

How to run a script as soon as the week number changes?

I would like to keep my download folder sorted. My goal is to have the files of the current week in the download folder, and the older files in a folder named after week number and year (eg 2013.09, ...
1
vote
1answer
231 views

Daily logRotate for apache at specific time

How can I execute logRotate daily at a specific time (3h30) each day? Specific details on how to do this would be appreciated. I'm on Debian.
0
votes
0answers
50 views

fcron or followup on debian wheezy (stable)

I've been using fcron for a long time on debian linux. In oldstable it is still existing fcron_oldstable. So sad in the actual stable wheezy there is no fcron_stable. Are there suggestions which cron ...
2
votes
1answer
677 views

Crontab + Ruby on Rails: /usr/bin/env: ruby: No such file or directory

I have a ruby on rails app and I need to schedule a crontab for a rake task. */5 * * * * RAILS_ENV=production /usr/local/bin/rake -f /usr/local/www/mysite-web-production/current/Rakefile ...
2
votes
1answer
424 views

Is there a update manager whitout gnome dependencies for xfce?

I'm looking a update manager for Debian Xfce. I installed xfce on a computer which will be use by laypersons. Therefore, I want another way (graphical) to launch apt-get update && apt-get ...
2
votes
1answer
104 views

output of top gets truncated to 80 columns when run by cron

I have got the following logging script: #!/bin/bash top -b -c -n 1 >> /var/log/toplog/top.log And the following record in my crontab: */1 * * * * /home/clime/scripts/toplog.sh The ...
1
vote
3answers
36 views

How to only output commands from CRON?

INPUT: * * * * * ( /path/to/foo -x ) 3 * * * * /full/path/tothing 3 3,2,4 * * * /full/path/tothing4 3 OUTPUT: ( /path/to/foo -x ) /full/path/tothing /full/path/tothing4 3 Q: How can I truncate ...
1
vote
2answers
741 views

Globally change path for all users, even in cron

We're setting up an SGE cluster with CentOS 6. My sysadmin is installing applications that are not installed via RPM (i.e. via other means like make install) should go in a non-standard directory, in ...
3
votes
1answer
327 views

How to change cron shell (sh to bash)?

Is it possible to make commands in crontab run with bash instead of sh? I know you can pass commands to bash with -c, but that's annoying and I never use sh anyway.
3
votes
3answers
316 views

Rsync problem with cron and no problem manually

I have a backup.sh file that launch an rsync command. This rsync is to backup my dedicated server on a RaspberryPi running raspbian. (I use keychain so I don't need to type any password etc ...) The ...
2
votes
2answers
113 views

How can I manage my crontab effectively to avoid issue by multiple updates by multiple users?

I have a crontab that includes many users updating it. The problem is that because of this, it is not easy to know who did what modification of a cronjob. I was thinking to create a script to do a ...
2
votes
2answers
178 views

Why are new cronjobs ignored unless crond is restarted in SLES?

I added a new cronjob with a user (SUSE LINUX Enterprise Server 9.4): # su - XXX $ crontab -e and this is what I added: * * * * * echo `date` >> /home/XXX/a.txt but the a.txt isn't ...
0
votes
1answer
91 views

Cron Job Clean Directory

How is it possible to delete files older than 14 days in a folder using a cron job? Everything I have tried so far hasn't worked.
2
votes
3answers
252 views

cron: bash syntax not working

I am trying to add following command to crontab: I=1; for X in $(/bin/ls -r /var/tmp/*); do [ $((I++)) -le 28 ] && echo "lower" || echo "higher"; done When executed on the command line (in ...
2
votes
1answer
228 views

Logrotate doesnt start proftpd triggerd by cronjob

Im currently running of ideas. The proftpd doesn't restart, if logrotate is triggered by the cron task. Logrotate rotates all logfiles stops proftpd but does not start proftpd again. If i force the ...
2
votes
1answer
109 views

Cronjob output to log

I'm using a script for testing broadband speed and I would like to set up a cronjob for testing every n minutes and output to a file. The command to launch it from a shell console and append to ...
0
votes
2answers
794 views

What is wrong with my cron job?

I'm new to linux, and was told I could use a feature called cron job to run a python script I made execute every 10 minutes. Problem is the the python script isn't running. There doesn't seem to be a ...
2
votes
2answers
446 views

Need help with a script to test for memory usage

I'm trying to put up a temporary band-aid while I work out a solution for a app's memory leak. What I wrote was a small bash script that I put in the root on the server. This is what the script is ...
0
votes
1answer
490 views

Cron does not print to syslog

I have following crontab file - # /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and ...
0
votes
1answer
415 views

Cron job does not fire up after a timezone change

I've tried eliminating many of the common errors, 1) ensuring that the PATHs are available for cron 2) there is an endline at the end of crontab file 3) the timezone is set-up by: cd /etc cp ...
4
votes
2answers
244 views

why doesn't 0 0 * * 1 root hostname >> /tmp/hostname.txt work as a crontab?

0 0 * * 1 root hostname >> /tmp/hostname.txt Should run midnight on monday and create a file in /tmp called hostname.txt with the output of the hostname command but it is just a blank file that was ...
2
votes
2answers
269 views

command not running in cron (systemctl suspend)

I have this cronjob set : * * * * * /usr/bin/systemctl suspend And it is not working. But I can run it in a shell and it works. I don't understand what could be not working. EDIT Redirecting error ...
0
votes
1answer
90 views

Why does OpenSSL automatically send me Terminal mail?

I for some reason am getting messages from OpenSSL constantly (not literally constantly, but every hour or so) sent to my Terminal mail box saying: Message 1: Subject: Cron ...
4
votes
3answers
543 views

Cron allowed special character “L” for “Last day of the month” on Debian

I'd like to know if L is one of the allowed special characters on Debian's cron implementation? I'm trying to set up a cron to run on the last day of every month. From the cron entry on wikipedia: ...
4
votes
2answers
208 views

Cron to not run on specific day but all other days

I have a cron setup to execute a bash script daily at 10pm. I have another cron setup to run monthly on the 1st of the month. Both crons launch a bash script, and the only different in the bash script ...
1
vote
1answer
90 views

Get system notification at a certain time?

Is there a way, in Linux or FreeBSD, to receive notification from system at a specified time? I'm thinking something in like of what inotify in Linux does for filesystem events. There IS a way to ...
3
votes
2answers
262 views

setting a cronjob in IST time

I am trying to set a cronjob run in a different timezone. I've googled a lot and found editing /etc/default/cron is the way to go. But this file is deprecated and I see the following message, so I ...
0
votes
0answers
30 views

Is there something as flexible as crontab for user-level autostarts? [duplicate]

I'm looking for a flexible per-user initialisation tool to kick off user daemons when the system (re-)boots. I suppose something similar to crontab would be great, which works for every user ...
1
vote
1answer
133 views

How to figure out what is performing scheduled server reboots?

I'm helping a friend with a server and it appears the server reboots every week on Sunday night. How can I figure out what is causing is the server to reboot? Aside from rebooting, the server appears ...
1
vote
2answers
162 views

Run a cron job every minute, meaning of syntax [duplicate]

I read somewhere that you can add a cron job to run every minute like this: #min hour day month weekday command */1 * * * * <your command> What does the /1 part mean? Can I ...
0
votes
3answers
505 views

Custom crontab does not work (FreeBSD)

I created file crontab.custom with: */1 * * * * /home/username/data/www/run.sh And run.sh contains: php script.php After this I run this command crontab crontab.custom. Now crontab -l ...
2
votes
1answer
293 views

How to add crontab in FreeBSD

I am trying to add a job to my crontab in FreeBSD but it is not working : I have used this to add the job: sudo crontab -e -u vaibhav @daily /home/vaibhav/applications/comparison/scrapy but it is ...
1
vote
1answer
103 views

Script to restart the application

I need to write a script for the below scenario in Linux: Run a cron every 5 minutes. grep the application log file to see if we can see the pattern "ORA-". If we see this pattern: stop the ...
1
vote
1answer
111 views

Launch 2 celery processes via cron

I'm trying to chain some commands to periodically check/launch two processes via cron (I'm on a shared host, can't change things around). After a lot of googling around, all the things I've done don't ...
7
votes
1answer
364 views

How to autostart a background program by a non-root user?

As a non-root user, I want to run a background job when the system boots. It's sort of a service which doesn't require root privilege. Is there a way to do it? One way is to put sudo -u user command ...
1
vote
1answer
260 views

Cron automated bash script to run run 1 bash script then another, plus integrity check

So I have a custom in-house app developed by a 3rd party. When the app is running, I can verify it is running with the "screen -ls" command. As long as screens are running for rails and freeswitch ...
3
votes
1answer
462 views

Cron job still running when deleted

On a server I inherited, there is a cron job running hourly on one of the Debian servers. It sends an email out to a non-existent email, but bounces back to my account since I listed myself as the ...
2
votes
1answer
87 views

Executing 'ssh-add -D' from a cron job doesn't work

I've set up an openSSH server on an ubuntu-server machine, and I configured it to use public/private key (without password). I want to require both password and key check when the client connects to ...
1
vote
1answer
590 views

Pimp rsyslogd to have less i/o (cron, pam,…) and less logging

On my raspberry I really don't need crons and pam logging and I want to have less i/o to make the SD card life a little longer.. I have already removed cron with the second line cron.none, I'm ...
2
votes
1answer
159 views

systemd - Timer units that mimic anacron behaviour

I need to write a timer unit for a machine which is turned of frequently (e.g. classical desktop setup). This timer unit needs to be activated regularly but not very often (e.g. weekly, monthly). I ...
2
votes
2answers
187 views

Stop cron sending mail for backup script?

I have set up a backup script to back up world data on my Minecraft server hourly using cron, but because the worlds being constantly edited by players, tar was telling me that files changed while ...
2
votes
2answers
609 views

Solaris: how to forward cron e-mails?

If a cron job produces output it is e-mailed to the user's account. I would like to redirect this e-mail to another e-mail account. Preferably on a user-by-user basis. I've looked into some options ...
1
vote
0answers
26 views

Script executed from cron doesn't display GUI notifications [duplicate]

The script below has the name notifyrssh.sh. 1: File=/home/vaios/Desktop/tempcron/liveusers.txt //OK 2: cd /home/vaios/Desktop/tempcron 3: ps -aux | grep sshd > ...
1
vote
0answers
107 views

Scheduling cronjobs at specified time

I have scheduled some jobs in crontab which are to be run one by one, at some specific time. My script for crontab is : 15 10 * * * /Users/sri/files/BatchFF.sh 45 11 * * * /Users/sri/files/BatchGC.sh ...
2
votes
2answers
3k views

Run a sudo (or startup) python script from cron on a Raspberry Pi?

I'm helping out with an art project (http://stargateeggbeater.com/ for those interested) built on Raspberry Pi. The RPi controls an addressable LED strip through the GPIO, using the spidev device per ...
1
vote
1answer
85 views

How can I create cron jobs in specific files?

I want to have a separate folders for cron jobs like: /mydata/cronjobs Now in that folder I want to have files like backup_server which will have the content like: 30 3 * * 1-5 ...
4
votes
1answer
418 views

How is cron scheduling actually implemented and makes sure scripts run on time?

I want to ask about cron jobs. OK, we place the scripts in the crontab and the cron daemon executes them. Now if I understand this, each minute, cron checks the crontab of each user and executes the ...