Questions tagged [cron]

Cron is a time-based job scheduler in Unix-like computer operating systems. Cron enables users to schedule jobs (commands or shell scripts) to run periodically at certain times or dates.

For information about the most common cron issues and how to fix them, see Why is my crontab not working and how can I troubleshoot it.

1957 questions
0
votes
1 answer

How can I tell a script is running under cron?

Is there a standard way to know if a shell script is running under cron as opposed to running from the command line. i.e. I'm thinking of running with more verbose output when manually kicked from the command line and enabling some features that…
Stuart Woodward
  • 1,343
  • 4
  • 14
  • 29
0
votes
3 answers

Odd Crontab Service SMB Restart Issue

System: Debian Wheezy x86_64 Service: Samaba When I'm in a terminal I can use service samba restart or /etc/init.d/samba restart to restart the service. When I create a cronjob and use /etc/init.d/samba status it works. But when I…
LinG33k
  • 1
  • 1
0
votes
0 answers

cron job time managment

I have cron job A and B (both jobs run every minute) from 9.00AM to 6.00PM I like to make the second one run after the first one in 30 second.both cron job should be run by root user. for example if the cron job A start to run at 9.00.00 AM cron job…
Ahmad Abuhasna
  • 195
  • 1
  • 9
0
votes
2 answers

Wal-E cron job not executing

I have a cron job setup that is suppose to be running the wal-e backup-push command. The command works fine if manually ran through the command line. As the postgres user of course. So I setup a cron job to run this under the postgres user. It runs…
Jacob Waller
  • 135
  • 5
0
votes
2 answers

Add cron job to save a web link into txt file

I need to setup a cron job to save a webpage info into a text file in a specified folder at every hour. here is what I've tried: crontab -e in insert mode I typed: 0 * * * * wget http : // webpage url > /foler/test.txt Is this a correct syntax?
ebyrock
  • 1
  • 1
0
votes
1 answer

Check how much time has elapsed for Cron job and send email

There is a cron job that is set which runs throughout most of the day, sometimes the job gets stuck and I would like to set a time or check on it which let's me know if it has been stuck for more than 20 minutes, I wanted to get ideas on how I can…
0
votes
1 answer

Ubuntu VPS not running cronjob

I used sudo crontab -e to add the following cronjob 0 0 * * * /usr/bin/php /var/www/path/to/artisan elite:reset-user-likes The command works correctly if a type it myself on the terminal. I also tried setting the cronjob to run every minute to see…
0
votes
1 answer

Cron needs restart in order to process modified /etc/crontab

I know there are many questions about this which say it will work right away. Alas, at least on our newer SLES (Suse Linux Enterprise) 11 SP3 systems, that no longer seems to be the case. (You have to reload/restart cron in order to get it to…
Marki
  • 2,854
  • 3
  • 28
  • 45
0
votes
1 answer

Unable to send external email via crontab

I'm trying to send email out from crontab. I've tried making crontab run a basic shell script, as well as specifying the actual command within the crontab. I've tried doing this with mpack and ssmtp . I've noticed that if i execute the command or…
Vince
  • 1
0
votes
1 answer

Send email on ldap creation

I have an LDAP server setup on a server running Debian 7 and I wanted to make it send out an email whenever a new user was created on that LDAP. I thought a cronjob would be best, but I have no idea how to do a search for recent creations. Mail…
Epicblood
  • 103
  • 4
0
votes
1 answer

Cron occasionally fails with "grandchild #X failed with exit status 3"

I have cron jobs and every now and then they fail. Just after log message that the command has started, there is grandchild #X failed with exit status 3 message. On the next run scripts finishes correctly. It happens to different scripts with…
Jakub Kulhan
  • 121
  • 5
0
votes
1 answer

Openshift cron not working

I'm using OpenShift and I have a shell script that is executable and can be run from the command line, however cron doesn't seem to even attempt to run it. I have placed my shell script in ~/cron/minutely When I run: /sbin/service crond status, I…
Josh
  • 141
  • 3
0
votes
1 answer

How can I flush and/or rotate cronevents?

Can anyone tell me how I can flush / clean / zeroize or better still rotate the contents of cronevents? I need to solve this, because I am attempting to 'productionize' my fileserver instance-pair which rely on some services under Cygwin…
johnz
  • 314
  • 3
  • 7
0
votes
2 answers

CURL isn't running from Crontab

Here is the output. Not sure if cron isn't running or other issue. If I issue curl --silent http://..../scanner.php from terminal, I'm getting desired output. Actually scanner.php do some check and send an email. I've getting that. But not working…
IFightCode
  • 111
  • 2
  • 9
0
votes
1 answer

Automysqlbackup - dumped files have wrong permissions

This question has been askewd here. But it was not answered. I just got a 3rd server and on all 3 servers I use Automysqlbackup script to create MySQL backups. I do it with cronjob: 52 04 * * * /home/backups/backup.sh >/dev/null 2>&1 Dumped and…
tfegc
  • 221
  • 1
  • 5
  • 10