Cron is a job scheduler that allows users to run commands periodically.
0
votes
0answers
14 views
How to make cron job which suspends computer before specified time of the day
I am trying to make script which suspends computer if it is used before specified time of the day or if it is used too long.
#! /bin/bash
...
0
votes
2answers
22 views
how to properly log the output of a console program that frequently updates “parts” of the screen, resulting in a messy log file?
I have some Java executable (jar) that is run my some shell script from a cron job once every night. That executable does not print log statements "as usual" just by printing them out in a sequential ...
0
votes
1answer
23 views
Cron.d doesn't run my command
I am trying to execute a command using cron.d. I've tried so far this to test
11 13 * * * root echo \"OK?\" >/tmp/cron-is-ok
which runs fine! Runs as it should. But if I replace the command with ...
1
vote
1answer
40 views
/etc/cron.hourly in home directory
How does one run scripts in a folder on a schedule without needing to bother with root/sudo? Ubuntu has /etc/cron.hourly, /etc/cron.daily, etc so I was wondering if there was also a folder in the home ...
1
vote
1answer
18 views
CRON problem - an apt-get dist-upgrade job
This question is related to Debian 8.4.
I applied the same updating mechanism to several desktop stations and one unused server. This problem appeared on the server but I suspect it will happen on ...
0
votes
1answer
45 views
How do I know if crontab is working fine?
Is there a log of crontab for me to know if crontab is working fine? I am on Linux Mint 17.3.
What I have done:
ran crontab -e as root
it did not exist, so I chose nano editor and proceeded
entered ...
1
vote
1answer
36 views
Get the process start time irrespective of NTP updates
I'm trying to record the start time of a process kicked off by an @reboot cronjob. I'm using ps -p $$ -o ltime= presently, but I've run into a catch.
My machine (a Raspberry Pi) connects to the ...
0
votes
1answer
20 views
Ampersand in Cronjob [duplicate]
I have found the following entry in a user crontab:
*/5 * * * * ~/bin/php /path/to/phpscript &> /path/to/logfile
What is the meaning of the & (ampersand) here?
Has it still the meaning ...
1
vote
2answers
35 views
Is it safe to set a cron job for apt-get upgrade? [closed]
Is it a good idea to create a cron job for apt-get update; apt-get upgrade for my webserver?
So not apt-get dist-upgrade.
1
vote
1answer
34 views
Cronjob Create File Every Execute
I can create a cron job for every 5 minutes with following codes:
*/5 * * * * root bash /etc/cron.d/mongo/5min.sh
In the /etc/cron.d/mongo/5min.sh file send request with cURL:
#!/bin/sh
...
3
votes
1answer
41 views
Run a command when any cron job fails instead of just sending an email
Is there some way to call a script of my own instead of just sending an email when any cron job fails?
1
vote
1answer
39 views
Cron suddenly calls a script every 15 minutes
On a Debian server, I have a crontab entry that should call a script every day at 04:21 AM.
That's what it did, until today .. but now the script is called every 15 minutes without any reason !
I ...
1
vote
0answers
14 views
Rolling job scheduler
I have a number of servers that I want to perform the same jobs on, one server per day, once the final server has been acted upon the script should return to server1 and start over again.
The jobs ...
-1
votes
1answer
29 views
How to use crontab to shutdown linux for every saturday 3PM [closed]
Hi I want to create schedule on my Linux server to shutdown it every Saturday 5PM. How can I do it.
1
vote
1answer
34 views
What are the filesystem permissions for a cron job?
I'm working on a production server. It has some daily cron jobs, and here's the filesystem permissions on them:
cron.daily$ ls -Al
total 24
-rwxr-xr-x 1 root root 332 Dec 3 10:33 0yum-daily.cron
...
0
votes
1answer
32 views
When do cron tasks begin to execute?
Having read through the Wikipedia page on cron, it is unclear to me when cron begins to execute the tasks I have defined in the crontab file. Is it during the boot process - or even at the end of it - ...
16
votes
2answers
704 views
Does crond handles summer time +1 hour change?
Last weekend we had to change the time from 02:00 to 03:00.
Question: What would happen if there was a cronjob at 02:30?
crond is a very old solution for scheduling, it should probably handle it, ...
3
votes
1answer
22 views
Using zip package for debian with password
I'm trying to make a backup .sh script to zip my files and to protect the zip archive with a password.
For that, I'm using the zip package (apt-get install zip) and there's an encryption option ...
-1
votes
0answers
30 views
Cron command is running but not actually executing
I'm on a new server and having issues getting crons to run under cron.d
Here is the content of /etc/cron.d/mytest:
MAILTO=""
SHELL=/bin/bash
*/1 * * * * root sudo /usr/bin/php ...
0
votes
1answer
30 views
Why is crontab executing on one server but not the other?
I have two servers on linode that have some websites on them. I created a script to see if mysql is running on the server and if it's not running then the script will start mysql. The script is on ...
0
votes
2answers
31 views
Is it safe to allow users to use cron to schedule tasks? [closed]
If a user is granted permission to schedule cron jobs, i.e. by being listed in cron.allow, does this make them any more of a "threat" to the system than a user without that permission?
In my case I ...
1
vote
0answers
38 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.
...
1
vote
1answer
49 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
3answers
41 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
27 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
49 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
46 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 ...
1
vote
2answers
22 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
...
1
vote
1answer
49 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 ...
0
votes
2answers
60 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
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
0answers
24 views
Incron IN_MODIFY and IN_WRITE_CLOSE strange behavior
If i set incron to listen folder for IN_MODIFY my script launch twice. If i set IN_WRITE_CLOSE script launch when file open and file close with write. Why?
script:
echo `date` ...
0
votes
1answer
47 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 ...
3
votes
1answer
24 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
56 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 ...
0
votes
1answer
27 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, ...
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
30 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
30 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
50 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
18 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 ...
1
vote
2answers
25 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
35 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 ...
1
vote
1answer
35 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
12 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 ...
0
votes
1answer
31 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
38 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
40 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
17 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 ...
2
votes
2answers
82 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?