Expect script cronjob running but dying prematurely
I have an Ubuntu machine that I'd like to update automatically. I've written an expect script to run the aptitude package manager and update my packages. Essentially it does:
while answering "yes" at the appropriate time.
It works quite nicely when run directly from the command line. However, when the cronjob I set up runs it (as root), it dies very quickly. In an attempt to figure out what's going wrong, I 'tee'd' the output into a log. In the "aptitude update" stage, it only updates maybe 1/6 of the total sources before inexplicably terminating. It never reaches the "upgrade" stage.
Does anyone have any idea what I might be doing wrong or have any way I might be able to diagnose why the script is quitting early?
Hi All
Some how, variables are not getting exported while running the script in cronjob. Variable value is coming blank. But the variables are geting the value when the same script I am running manually. Any idea why?
When running the script in cron-job
==================================... (7 Replies)
Hi
I have a shell script, it run ok if executed from the path it is located at but doesnot run when the same is tried through cron-job.
can someone help me please.
regards
gaurav shrinivas
Email address removed (8 Replies)
Hi all, i got a really strange problem
i wrote a script, when i run this script manually everything works fine
but when i make a cronjob for it, with the same user, the EXPECT script will not work.
Only the first line will be executed
this is the SHell bash script
#!/bin/sh;
php -q... (2 Replies)
Hi
Im very new at working with unix and this problem I simply can not understand. I know there are a lot of threads about problems with shell scripts behaving differently when run from a terminal and from a cronjob. I have tried everything(almost) but I still havent cracked this problem.
Im... (15 Replies)
I have a very basic perl script that attempts to find if a process is running. If the process is not running then the script is supposed to start the process. If I execute the script from command line it works fine as expected. However if the script is executed via cronjob, the script cannot find... (1 Reply)
Hey all
Found this forum googling for solutions. Great community this!
Im looking for help trying to run a php script every 20 minutes.
The script basically has to loop continuously forever but inexplicably hangs every 30 minutes or so. I have not been able to debug the script and find... (2 Replies)
Hi,
I have script which is properly running but when i schedule it in cron it throws an error like :
Your "cron" job on retrprdapp1
/usr/bin/sh /retr/cron/ftp.sh 2>&1
produced the following output:
/retr/cron/ftp.sh: syntax error at line 17: `(' unexpected
line17 is
# Get list of... (10 Replies)
hi everyone I'm newbie in this forum hope I can get some help here :)
I have a command in crontab that executed every 1 minute
sometime this command need more than 1 minute to finish
the problem is, the crontab execute this command although it's not finish processing yet and causing the system... (7 Replies)
Hi,
I have a .ksh script which updates the database. The script is running fine manually but it is not running through cron.All the file permissions are fine.
The script contents are as below:
#!/usr/bin/ksh
ddate=`date +%Y%m%d`
echo $ddate
nohup sqlplus crm/crm @db_state_sync.sql >>... (3 Replies)
hi, please help, keep getting this bolded error and look it up and people say
its your environment variable though i tried to set it manually in expect..it run fine if i run it manually but once i run it by cronjob it error below..i tried to comment out ip/login info with *..
logfile::
START... (0 Replies)
Discussion started by: cssanangeles
0 Replies
LEARN ABOUT LINUX
update-manager
UPDATE-MANAGER(8) System Manager's Manual UPDATE-MANAGER(8)NAME
update-manager - graphical management of software packages updates
SYNOPSIS
update-manager [options]
DESCRIPTION
Update-manager is a frontend for the apt package management system. It allows you to perform some actions of the command line tool apt-get
in a graphical environment.
Update-manager is especially designed for upgrading your system, or migrating your system towards a more recent version.
OPTIONS
For a daily use, you may launch update-manager with no options so that your system is just upgraded.
For migration purposes, update-manager accepts some options:
-h, --help
Show a similar help message
-c, --check-dist-upgrades
Check if a new distribution release is available
-d, --devel-release
Check if upgrading to the latest devel release is possible
-p, --proposed
Try to run a dist-upgrade
--dist-upgrade
Try to run a dist-upgrade
ACTIONS PERFORMED DURING AN UPGRADE TO A NEW VERSION
* eventually reinstall the package ubuntu-desktop
* switch to an updated sources.list entries
* adds the default user to new groups if needed
SEE ALSO
Synaptic, sources.list, aptitude
AUTHORS
update-manager was developed by Michael Vogt <mvo@ubuntu.com> with various contributors (see AUTHORS file)
This manual page was originally written by Bruno Mangin and Michael Vogt <mvo@ubuntu.com>.
COPYRIGHT
Copyright (C) 2006-2007 Canonical
There is NO warranty. You may redistribute this software under the terms of the GNU General Public License. For more information about
these matters, see the files named COPYING.
August 2, 2007 UPDATE-MANAGER(8)