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
2 answers

Debian webserver - Crontab error (not running php script)

I've a webserver with several sites and I'm trying to run a script by crontab but it gives me a error (126 and 127) My script is in: /var/www/site1/script.php When I run the command: php /var/www/site1/script.php The script work as normal. I've…
Swim
  • 3
  • 4
0
votes
0 answers

mysqldump not working/running via cron job

I have a crontask which runs at 1am every morning and dumps all databases. 0 1 * * * /var/backups/dumpit.sh 2>&1>> /var/backups/dumpit.log The dumpit.sh source: #!/bin/bash /usr/bin/mysqldump -u user -ppass --all-databases | gzip >…
xylar
  • 167
  • 8
0
votes
4 answers

Cacti plugin to email me network traffic graphs

I have a cacti graph set up. I'd like to receive daily emails of some graphs. What are my options?
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
0
votes
2 answers

Crontab on Ubuntu Server 12.04 doesn't run as it should (PHP script)

I have a PHP script which downloads and manipulate an image from some server and then saves it locally. Because image is update every 5 minutes I want to download and save that image every 5 minutes also. If I run script from browser or console it…
Soriyyx
  • 101
  • 2
0
votes
1 answer

Options for Executing Scheduled Scripts on a PHP Server

I have a server that I've setup running PHP. This serves JSON files and is running fine. I also have several scripts that reads data from an outside source, connects to my MySQL Database Server, and runs commands to save the data to the MySQL…
Chris
  • 353
  • 1
  • 4
  • 10
0
votes
1 answer

rsync over ssh fails as cronjob works on shell - NAS4Free

This is my rsync.sh in the home directory of my backup user $ cat rsync.sh #!/bin/sh rsync -avvvz --stats --log-file="/var/log/rsync_client.log" -e "ssh -i /mnt/stor0/backup/backup-rsync-key" /mnt/stor0/home/ nas@remotehost:/mnt/backup/ when I…
0
votes
3 answers

Cant run rc.local manually and doesn't run automatically on ubuntu

This is quite a simple one. I created an rc.local file here: /etc/rc.local I made it executable. However, it doesn't run when I boot the server. I can see it in the directory and when I try to run it manually I get this message: root@:/etc#…
J.Zil
  • 1,123
  • 3
  • 21
  • 29
0
votes
1 answer

Changing IP of the machine at regular intervals

I have a pool of public IP addresses. There are some services in my box which binds to these. What i'm trying to achieve is to automate the IP change process. Best way to do this is to write a script which will do the following: 0) Kill the services…
Aftnix
  • 233
  • 2
  • 8
0
votes
1 answer

Running cronjobs with proxy

I have a requirement where I have to run several cron jobs with specific IP in an EC2 instance. That specific IP is used by another EC2 instance. I have access to that EC2 instance. Is there any possibility that I can make cron job to use that IP…
0
votes
1 answer

Centos: List all cron jobs in a week ordered by date

I'm trying to get all cron jobs in the current week (or from monday to sunday) ordered by schedule time. I'm trying with some elaboration on the output of the command crontab -l I appreciate any smarter solution.
alesdario
  • 326
  • 1
  • 4
  • 11
0
votes
3 answers

Curl don't work on cron execution

I have bash a script like the following #!/bin/bash date curl http://lab.nextt.com.br/somefile1.html -z ../public_html/somefile1.html -o ../public_html/somefile1.html --silent --show-error --location curl http://lab.nextt.com.br/somefile2.html -z…
Filipiz
  • 117
  • 1
  • 2
0
votes
2 answers

Running multiple cron jobs from single script

I have three different jobs that I want to run from the FreeBSD shell. I would like to consolidate them into a single script, if possible, but I can not find any syntax to do that. Is there someway I can accomplish this?
Daryl
  • 11
  • 1
  • 1
0
votes
1 answer

Mysql select query not generating result on cron but is ok via terminal

We have a C program (source is below). We compile it with: gcc -Wall -Wextra -g $(mysql_config --cflags) get1ReceiveSource.c $(mysql_config --libs) -lrt -o get1Receive The select give results perfectly when run on the terminal using ./get1Receive.…
biz14
  • 381
  • 1
  • 3
  • 10
0
votes
2 answers

Start script.py after reboot as user xy in Debian Squeeze

How can i start a python script.py after a reboot as user xy in Debian Squeeze automatically?
0
votes
1 answer

Cron permissions?

I have a bash script which if I run manually (as root) performs all of its tasks without issue. The tasks are just a few php scripts and then a "mv" to move the process file to a temporary folder. The problem is, when I run the script as a cron job,…
Adrian
  • 1
  • 3