I have a user that wants to run a backup of an oracle database via a file copy. They shut down the database once a week, and do a full copy. She wrote a script to do this for her, and it works, but when she runs it from cron, it takes twice as long. I took a look, and found a way to get it to run as though she is at the console, but it does not seem to work. I have an excerpt from the script. She said that she has used the set +o bgnice to make it not use a lower priority, but it still takes twice as long when she does it via cron rather than interactively at the console. Does anyone know how to change the priority of the cron job? We don't really want it to run under the root cron (I think that is why the bgnice does not work) because she then has no way to change the schedule if she needs to. She is running this with a user privilege account rather than an elevated account. What is the best way to deal with this? Is there perhaps a group that would allow this sort of thing? Thanks for the help.
#set +o bgnice
echo "Starting u01 Copy..."
#sh +o bgnice copy_dir.sh u01 $backupname &
sh copy_dir.sh u01 $backupname &
echo "Starting u02 Copy..."
#sh +o bgnice copy_dir.sh u02 $backupname &
sh copy_dir.sh u02 $backupname &
echo "Starting u03 Copy..."
#sh +o bgnice copy_dir.sh u03 $backupname &
sh copy_dir.sh u03 $backupname &
echo "Starting u04 Copy..."
#sh +o bgnice copy_dir.sh u04 $backupname &
sh copy_dir.sh u04 $backupname &
echo "Starting u05 Copy..."
#sh +o bgnice copy_dir.sh u05 $backupname &
sh copy_dir.sh u05 $backupname &