I have a problem where MySQL (running on Ubuntu 12.04 with all latest updates) dies after a few days so put this script into a cron job that runs as root every 60 seconds.
I have written a shell script to start mysql server & send a mail to admin user if it's restarted via shell script. What i am facing an issue if I run this shell script on terminal it's work perfectly & If same script runs via cronjob it's only sending the mail to the user & problem remains same.
Hello,
I just setup a mysql slave server, and it's running smoothly, except I should manually check if the server safe to shutdown every time I need to restart or shutdown it.
This problem is related with temporary tables that master server created, as described in mysql doc.
So, I think of making custom shell script that will automatically run each time before the slave server restart/shutdown
When I run a script manually using root it is working fine. when I execute the same script inside cron it is not running. I checked the cron is actually calling the script but the script is not executing. I exported the output of echos in the script to the text file but the text file is didn't logged anything.
Hi,
My shell script not getting called through cron job.
The same works fine when executed manually.
I tried to generate logs to find if the scripts has some errors related to path using following command- trying to execute .sh file every 5 mins:
Code:
*/5 * * * * /home/myfolder/abc.sh /home/myfolder/abc.log 2>&1
But even the logs are not getting generated at the mentioned pat
We're mostly a Linux shop, but we have a print server running Windows Server 2008, and use an application called Print Helper to print invoices. I need to find a way to check that this application is running, and automatically restart it if it's not.
On Linux I'd probably do this with a small shell script and a cron job, but I'm not sure how to accomplish this on Windows Server.
Howdy,
I am nearly tearing my hair out as Cron isn't running a script that should work.
I am interning for a company. Their rsyslog keeps track of traffic that gets past a firewall. It creates two files called pix.log and pix2.log.
Hello.
I know there's at least 4 other threads related to this here.
I am trying to crate a shell script that would:
connect to a remote server that has MYSQL running
On success run "CREATE DATABASE foo;"
So far I tried:
#!/bin/bash
mysql -h 111.11.11.11 -u root -p'XXXXXXX'
mysql> CREATE DATABASE foo;
or
echo "CREATE DATABASE foo;";
But no success.
I am using the command line to run the shell script.
# sh create_mysql_database.sh
but all it does is