1
vote
2answers
40 views

Kill all currently running cron jobs

For some reason my cron job scripts aren't exiting cleanly and they're backing up my server. There are currently a couple hundred processes running for one of my users. I can use the following command ...
0
votes
1answer
401 views

Cron won't use msmtp to send emails in case of failed cronjob

I'm trying to configure a machine so that it will send me an email if one of the cronjobs output something in case of an error. I'm using Debian Wheezy. Cron is working normally (without the email ...
2
votes
1answer
220 views

CLI SAPI based daemon, PHP app with cronjobs support

I need to build an CLI SAPI based daemon, PHP app with cronjobs support for iOS platform. We have dedicated server. What kind of PHP environment to run this type of PHP applications?
0
votes
1answer
67 views

Cronjob in cPanel

I'd like to schedule a cronjob on my server to backup the entire public_html directory daily. I am logged into cPanel and I am on the Cron Job page where I have it set to run this command everyday at ...
1
vote
3answers
283 views

Some $_SERVER parameters missing when accessing PHP script via Cron

I have a script that I need to run with PHP via cron. The original author of the script made a lot of user of certain $_SERVER parameters (like REQUEST_URI). But it appears that certain variables ...
1
vote
1answer
214 views

How to prefix logs with date and time

How to prefix all logs with date time before they are written to the log file? Let's say I am logging unexpected errors in crontab in the following way: python somescript.py >> /tmp/output.log ...
2
votes
2answers
2k views

Sending mail from command line if body not empty

I'd like to write a simple script that alerts me if a log changes. For this I'm using grep to find the lines I'm interested in. Right now it works like this: grep line /var/log/file | mail -s Log ...
-2
votes
2answers
169 views

Mutt, empty email account from command-line [closed]

trying to figure out a cli way to empty all email from a specific email account. It is certainly possible to type: mutt -f account D ~s .* then quit.... Is there a way to do this all from ...
1
vote
1answer
226 views

Cron Error on Ubuntu (Command Not Found)

Trying to add this to the crontab (Ubuntu): 0 2 * * * /usr/local/sbin/aws dsnap | grep vol-193vja9 | sort -r -k 5 | sed 1,5d | awk '{print "Deleting snapshot: " $2 " Dated:" $8}; ...
3
votes
2answers
3k views

php cli memory limit

I am getting a memory error in a php cron job: Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /opt/matrix/core/lib/DAL/DAL.inc on line 830 The ...
0
votes
2answers
1k views

Strange problem with crontab and echo

$ echo -e "test1\ntest2" > logfile $ echo -e "test1\ntest2" >> logfile $ cat logfile test1 test2 test1 test2 $ rm logfile $ crontab -e * * * * * echo -e "test1\ntest2" >> logfile $ ...
3
votes
3answers
615 views

ls formats date differently when run by cron

In FC10, ls outputs dates in 'YYYY-MM-DD HH:MM' format when called by command line or script. When called by cron, the dates are in format 'Mon DD HH:MM'. What gives? why the change? I've checked ...
0
votes
1answer
597 views

Plesk command working in manual script, not in cronjob

In order to install a hosting plan, I use Plesk's commands in SSH as specified in their official guide. When typed directly in SSH (Putty), it works perfectly. The line is as follows with obviously ...
4
votes
2answers
2k views

crontab - run immediately?

I have a bunch of cron jobs which run every 30mins. I'm currently doing some testing, and instead of setting the cron jobs to run every minute, is there a command which I can execute that'll run the ...