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

learn more… | top users | synonyms (1)

1
vote
0answers
113 views

php curl script working in cli but not on crontab [closed]

I have set the following on crontab */1 * * * * /opt/php-5.3/bin/php -f /var/httpd/appliance/appliance/docs/vip_dashboard_script.php >> /tmp/vip.log 2>&1 the contents of my script. &...
23
votes
3answers
100k views

crontab's @reboot only works for root?

man 5 crontab is pretty clear on how to use crontab to run a script on boot: These special time specification "nicknames" are supported, which replace the 5 initial time and date fields, and ...
1
vote
1answer
58 views

Cronjob running but no crontab for user?

I'm having troubles with my crontable on the scientific cluster I'm using. It's a bit peculiar, since the jobs seem to run (I get regular mails from some updates) but when I type crontab -l the ...
2
votes
2answers
3k views

Send backup by email with crontab

I use this cron job to do a backup of /home/blah/ each day at 01:00 a.m. : 0 1 * * * tar -zcf /home/blah/backup.tgz /home/blah/ In fact I would prefer that an email is sent to me with the .tgz file ...
-2
votes
3answers
95 views

linux crontab + how to set crontab at 23:00

please advice how to set the crontab in linux to run a task each day at 23:00 at night and if someone know a shell script that we can run in the linux that can help us to set acrontab syntax
1
vote
1answer
55 views

Crontab resetting itself

I have a computer with Ubuntu server 15.10 installed on it that sits in the same room I am in. I use it just as a Minecraft server, map renderer and whatever else php scripts I want to run scheduled ...
1
vote
1answer
29 views

Crontab Line Date

I'm getting ready to launch a crontab, but since I'm new at it, wanted to check with someone if they could verify that what I'm doing is correct. * 3 * * 5 /usr/local/bin/backup.bash The above ...
1
vote
2answers
152 views

How can I start program on boot in Ubuntu 14.04?

Is the root crontab the only way? I'm starting up a MC server and don't want it to need me to manually restart it each time the server reboots for whatever reason. I don't want any login required ...
0
votes
2answers
113 views

Execute a shell script via crontab

Currently I got stuck by trying to execute a shell script via crontab. It does not work and I can't figure out what is wrong here. What I want to do is: Execute a javascript (index.js) file with ...
0
votes
2answers
250 views

How to automaticly open a URL at specific times each day

I am using kubuntu 14.04. I have installed cron using sudo apt-get install cron, and then I created this file in IDLE, called openurl.py. #!/usr/bin/env python import webbrowser webbrowser.open('...
1
vote
2answers
5k views

Run gui application on startup

I can run a script at boot by adding the following line to my crontab: @reboot perl /path/script That works fine. But the problem arises when I try to run a gui application such as gmail notify. It ...
1
vote
2answers
27 views

why /etc/cron.hourly/myjob not working?

In /etc/cron.hourly, there is one file: -rwxr-xr-x 1 root root 117 Mar 8 20:33 myjob myjob: 3,18,33,48 * * * * /usr/bin/python /home/me/src/myproject/src/manage.py myjobs > /home/me/log 3,18,...
0
votes
2answers
74 views

Edit crontab without SSH access [closed]

I have Debian VPS and I gave FTP access to somebody, say John. I don't want to give John SSH access, but he needs to put tasks into crontab. What are my possible variants?
1
vote
1answer
4k views

Null message body; hope that's ok

I have the following command below as part of a cronjob. When I run the command via cron or at the command line, I get Null message body; hope that's ok. The contents of the email are empty but when ...
0
votes
1answer
54 views

AIDE is taking forever to initialize

I have a server at home that I use as a NAS and some other services. The server has Debian Jessie on it, with 4x 4 TB harddrives in RAID5. I use this server to store all my home data, movies, games, ...
1
vote
2answers
30 views

Shell script says system when to execute for the next time

I've got a shell script. It is supposed to be executed automatically on and on over time. Maybe about three times a day. But I don't want to write a cron job for it since it's not the same time every ...
0
votes
1answer
50 views

Output of cron to file

I have a text file topcommand.txt which has a command as below: * * * * * /usr/bin/top -c | grep 'some process name' >> /home/abcd/topout.txt When I invoke this using crontab topcommand.txt,...
3
votes
1answer
29 views

How would you build a cron that empties the mail in all mailboxes?

I am new to Unix here. We have some mailboxes that are taking up an incredible amount of space and I'm trying to figure out a way to delete all mail that has been in the box for 30 days. Most of what ...
3
votes
2answers
175 views

Crontab shell script git pull and forever start

I'm trying to set up a Raspberry Pi to check a repo on startup and then fire up a node script with forever. I got the second part working, but I tried a dozen git commands with no success. Here is ...
1
vote
1answer
95 views

CentOs 7 CronTab set JAVA_HOME

With the root user I configured the JAVA_HOME variable for crontab like this: [root@localhost ~]# vim /etc/crontab _______ SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/jdk1.8.0_71/bin ...
0
votes
0answers
11 views

Is an automating apt-get update+upgrade unreliable or dangerous? [duplicate]

I use currently for updating my system a manual apt update && apt upgrade, usually sometime after my system has started. Unfortunately, sometimes I run that really late or even forget it. I ...
1
vote
0answers
43 views

Program/script to limit cronjob output

Short version: Is there an off-the-shelf program to avoid being pinged repeatedly be frequent cron jobs in periods when they fail? I have a custom implementation but it seems like something someone ...
1
vote
0answers
83 views

Linux password expiring and cron jobs failing

I have jobs running on a server which I access via powerbroker (so don't know the password). However the password of the user account expired recently and the said jobs failed. Due to password ...
0
votes
1answer
55 views

Debian : Cron job not firing

I have a cron-job, which is just a script, clearing directories, which accumulate files over time. Unfortunately, it is not firing. Any idea why. I have created the cron-job using cronmaker.com. How ...
0
votes
1answer
22 views

Storing PHP output issued by crontab

I have a PHP file that is suppose to send one email per day scheduled by crontab. Here is my crontab: 45 23 * * * php /var/www/html/linus/class/runnable/dailyStaffReport.php I noticed that it's not ...
6
votes
4answers
29k views

How do I add an entry to my crontab?

I am using crontab for the first time. Want to write a few very simple test cron tasks, and run them. $crontab * * * * * echo "Hi" doesn't produce anything. crontab */1 * * * * echo "hi" says */...
1
vote
2answers
33 views

Whats the difference between adding scripts in the /etc/cron.daily/ or editing in your script in crontab(-e)?

There are multiple options - with cron - to start your script at a specific time, but, is one more secure over the other? My question is simple: Whats the difference between adding scripts in ...
0
votes
0answers
43 views

Junk Material on root crontab

I am investigating unexpected restart issue on my Oracle Unbreakable 6.5 and found some unexpected results on crontab for root users. I know that these are junk entries that my be cause to reboot ...
2
votes
2answers
113 views

How to setup an invisible cron job?

Is there a way to schedule a task using crontab by root user but should not be visible using crontab command i.e, crontab -l either for root user or normal users?
0
votes
0answers
20 views

How to stop gnome-schedule from sending mails?

I use gnome-schedule in a permanent running UI session on Debian 7.9 Wheezy/Gnome 3.4.2.1. For each run, I get a mail into the local mailbox of the corresponding user, telling Launching ...
7
votes
2answers
13k views

Location of the crontab file

as many (most?) others, I edit my crontab via crontab -e, where I keep all routine operations such as incremental backup, ntpdate, various rsync operations, as well as making my desktop background ...
0
votes
1answer
53 views

How to run a shell script using cron and at

I was trying to learn about crontab. I tried to execute shell script using crontab. But I did not get the expected result. When I use crontab, 38 17 * * * bin/sh sh /home/agalya/unix/digiclock.sh I ...
2
votes
1answer
44 views

Crontab: variables in the date/time fields

When to run my scripts that go run reports can vary within the month as the data is not available at a standard time; sometimes on the 8th, sometimes on the 10th, etc. I have many reports to execute ...
0
votes
1answer
74 views

Sudo cron job using arp-scan gives empty output

I made a script called hello.sh and it contains the following: #!/bin/bash printf "$( arp-scan --interface=eth0 --localnet )\n" printf "test\n" after making it executable (chmod o+x) and running ...
0
votes
0answers
24 views

Logging memory issues with Cron

I'm trying to log memory errors/issues using cron, however I'm still unsure how to do this. I'm new to cron, but I entered our system with it already using the tool. We've been having memory issues ...
1
vote
4answers
5k views

Cronjob doesn't execute shell script, but when I am executing it standalone it works. Why?

Shell Type: >echo $SHELL /bin/ksh Cronjob : 15 * * * * /bin/ksh /wls_domains/resMGT/logs/bea/wlr3queuetransaction.sh > /wls_domains/resMGT/logs/bea/data/script.log The script is as below: ...
0
votes
2answers
46 views

Allow null password for file transfer from Sunsolaris machine to linux mchine?

I m trying to pull a file from a Solaris server to my Linux server and I did it successfully by using scp.I want to run this below command as a cronjob, How can I save password for this automation ...
0
votes
1answer
47 views

Setting anacron on mac

I set cron to run script every day using env EDITOR=nano crontab -e where I wrote something like this @daily path/to/sript.script Now I want to use anacron to be sure that script is going to be run ...
2
votes
1answer
946 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 ...
0
votes
2answers
94 views

Run this PHP file via Cron Job

Here is the script: <?php //Create back files? define('CREATE_BACKUPS', FALSE); if (!is_dir($argv[1])) { echo "You must enter a valid path such as /home/apresv/public_html or apresv/...
1
vote
1answer
118 views

Bash script not working with crontab

I own a raspberry pi that runs raspbian jessie. I'm using this raspberry with motioneye as a system surveillance. Motioneye records files to a sd card but i want to delete older files in folder /var/...
3
votes
2answers
2k views

crontab exclude specific date only

How can I write a cron that will exclude a specific date. let say : I need to run a crontab 6pm to 9pm in every 30 min on weekends and want to exclude 10th may 2014 only. Is It possible? How can I ...
3
votes
1answer
12k views

cron midnight 00 24 or 00 00? [closed]

My current crontab looks like this: 00 00 * * 1-5 "/home/user/script.sh" But it seems like it is not being triggered, all others are triggering fine except the one running at midnight. What is the ...
-2
votes
1answer
58 views

Executing MySql stored proc in Crontab [closed]

I have a MySQL stored proc named "item" and I want Cron to run it for me - in server of course. I'm avoiding using MySQL events to unify all my 'jobs' - backup,etc. Any how this is what I did in my ...
1
vote
2answers
115 views

Crontab not running a shell script

Using account alex, I created: ~/pocketmine/pocketmine.sh When I manually run this using the same account, alex: cd pocketmine ./pocketmine.sh start It runs fine. I have added this to /etc/...
1
vote
3answers
17k views

How can I check if my cronjob is runnning on my server via PHP?

I would like to give out a warning If cron is not running or if a certain cronjob is not set in crontab on my server. Is this possible to check with php?
0
votes
1answer
51 views

$PATH variable for CRON in OpenSuse

I have a script written which works perfect on terminal however gives error when called through crontab. It took me a while that the problem is with the cron environment not my script. so I tried ...
8
votes
3answers
13k views

How to add unique id to file name in cron job?

My cronjob looks like this: 5 3 * * * mysqldump -u root test > /srv/backup/mysql_daily.dump How can I make filename unique for every time when cronjob writes mysql_daily.dump?
2
votes
1answer
72 views

Can I move 0yum-cron from cron.daily to montly?

I installed the yum-cron package, configured too only check for updates and then mail me. But, doing this daily, seems a bit too much. I would like to do this monthly. The file is located in /etc/...
1
vote
1answer
55 views

Cron Job Hourly Except Certain Time Frame on Friday

I want my cron job to run every hour, every day except Friday when I don't want it to run at all between the hours of 2am-9am (but hourly outside of this timeframe). Ideally, I'd like to have this in ...