Thursday, 24 December 2009

Scheduling commands with "at" command

To schedule job to run at 20:00 the same day enter following command

at -m 2000

Running at with valid time takes you to at> prompt where you can enter the script or command you want to run then hit to exit "at" and save the scheduled job.

You can check your job has been scheduled to run at 8pm by using the atq command.

Other valid time formats to use with “at” command.
The above is practical is you want to schedule a command for same day, if you want to schedule the command for a specific date you have following options.

“at” allows a date parameter after the time, it allows shorthand notations like tomorrow and increments on the set time like next week.

at -m 2230 tomorrow (easy notation for scheduling cmd at 10:30pm tomorrow)

at -m 2pm next week (schedule for 2pm next week)

at -m 2pm + 1 week (schedule for 1 week increment from 2pm current day, equivalent of previous example)

Specifying an exact date & time.
Generally you’ll be using “at” to schedule short-term commands which don’t require a full crontab entry so current day or tomorrow tends to be the most used options. If you wanted to run the command on a specific date you can specify date with month, date, year format.

at -m 1030 Dec 25 (schedule cmd for 10:30am on Christmas day)

btw the –m flag is optional, it sends an email to user once the scheduled command has completed.

Tuesday, 22 December 2009

OFT letting banks of with robbery


BBC News reporting that OFT have given up trying to prove that bank charges are unfair.  I don't actually blame them for this as it's obvious they won't win because the law has never been about common sense.  I do wonder though whether the case would have stood a better chance before the banking bailout as lets be honest the Government must privately have hoped the banks would win so that they wouldn't have to pay back the money they've stolen from their poorest customers.

The point was always if a £30+ admin charge was fair, and this was to be investigated under fairness rules.  An independant team of academics, business people (including retired banking execs) were asked by BBC to calculate for themselves exactly what the maximum ADMIN charge could be.  They derived it would be at most £4.50 for the administration of a bounced cheque and £2.50 for admin of unauthorised overdraft.

If its £2.50 to administer an unauthorised overdraft then how in gods name is it fair that the banks are allowed to charge £30+ for administration, and its important to be aware that admin is the key word, if the charges don't cover admin then they must be punitive and the banks do not have the right to issue punitive charges.  

These charges hit the poorest people in the UK, and illegally raised £2.6 billion each year for British banks.  Its got to the stage that you think of a billion as a trivial amount of money, its worth going to google and entering "1 billion seconds in years" just to see how many years there are in a billion seconds, this will put into context exactly the scale of the revenue being unfairly generated.
They have essentially been robbing the poorest sector of the british public of a minimum of £27.50 each time they went slightly overdrawn, and now the courts have allowed them to get away with daylight robbery.

Banks now admit the levey raised from these charges cover the cost of banking and allow banking to be free for the general public.  Many of my friends think this is fair enough and don't see why they should pay for other peoples banking because other people can't manage their money but they need to take a step back and ask is it fair that the poorest people in society pay for their free banking, why stop there, why not get these people to subsidise their Sky TV.

A huge knock on problem with banks being allowed to get away with this is that all Corps are now in position to essentially levey these illegal charges on all customers who are late in paying a bill, fair enough if you're a month late but most of the time they're going to be no more than a few days late in paying it.  Whats needed now is another bright spark Student Lawyer like Steven Horne who brilliantly and single handedly started this whole movement by questioning the fairness of the charges, there might be a law student out there who can find the next loophole in this mess and get the ball rolling again.

Saturday, 19 December 2009

Bank Call Centres

A friend of mine (Mr Bain) is a wise, worldly, well travelled individual gave this advice on call centres many years ago.  "If you don't get the answer you were looking for then phone back until you do as its always a question of getting the right individual who knows what their talking about"

For some reason I've always remembered this and today I was phoning up a sore card call centre on behalf of someone else I have a long standing hatred of the banking system and the ridiculous sums of money they make for doing bugger all, so I always relish the opportunity to have a go at them.

They basically for 1st time ever were 5 days late with their monthly payment and were hit with a £12.00 charge.  So I phone up and get the standard obnoxious well rehearsed spiel of the £12 is a valid charge and cannot be refunded, you can write to complain to our customer services department but as the charge is valid.  I made it clear that as this was the 1st ever time this had happened, year of loyal service to the store etc etc.  Nae chance, this bitch just wasn't moving and I finished off with a f**k you and hung up.

So I phone up again, and what are the chances I get the same bloody east European woman who has obviously just recently started working there and really knows f**k all about customer service.  I immediately asked to be transferred to a team leader and I was put on hold.  There was no background musak so I immediately knew I was being had and had been placed into the ether where she probably hoped I'd be there for a minimum of 5mins.  Knowing the game she was playing I hung-up redialled, punched the sequence to get through asap and got through to an American woman.

This woman took one look at the account, ok you've been a loyal customer for years, always paid on time and she said no problem that's the admin charge cancelled.  I explained how we were treated by previous woman (although my f**k you comment was prob not very fair on her) and she added 500 store points to the card.

So "Bain" your advice is prob more true today than its ever been and worked a treat.  Chalk and Cheese the difference between the 2 Call Centre Agents.

There is a real issue in call centres and the way their driven by the corporate bastards they usually represent.  Essentially you get a fairly shittly low wage which is compensated by bonuses for reaching your "targets".  These targets are usually ridiculous and are usually a simple case of hitting a certain number of answered / resolved calls each month.  What this encourages is a system of blagging the call, giving the customer lip service to get them off the call asap so your within your 2 minute resolution time.  The staff that don't get the bonuses are more often than not the ones who do the best job and take the time to deal with the customer's problem and help resolve it.

On a lighter note on how call centres fobb you off a few years ago around Christmas i was on call (for free I might add!)  and there was an issue with the network so standard practice is to go through the usual diagnosis but it seemed to point to a problem with the frame relay connection, so I phoned Thus business support to see if there was a fault on the line.  It was Christmas evening and I don't think they could be arsed dealing with my query, so they asked me to ring "123" for technical support.  The problem was urgent and without questions i dialled and got "At the 3rd stroke the time sponsored by Accurist will be...."
I was fizzing mad for about 10 seconds but then had to see the funny side of their ingenuity and my own stupidity for falling for this.

Sunday, 13 December 2009

Config Oracle SqlPlus to have Linux user@db prompt

If you're working on multiple databases its handy to know from prompt which db your working on, saves you from having to continually have to do select name from v$database to check.

You can add USER@DB prompt to Oracle's SqlPlus client by editing
$ORACLE_HOME/sqlplus/admin/glogin.sql 
and adding the following entry


SET SQLPROMPT "_USER'@'_CONNECT_IDENTIFIER> "

While your there you might as well add following to set your default editor to be vi (or whichever you prefer)

DEF _EDITOR=vi

glogin.sql in $ORACLE_HOME/sqlplus/admin is obviously a global login set of sql commands which are executed for all users when SqlPlus is executed.

You can have personalised settings in a file users.sql, if this is in your home directory and you always run SqlPlus from there then it will find it and use its settings, otherwise you have to save it somewhere in your ${SQLPATH} env var.

There are 2 other var combos I know of that you can use for your SQL Prompt:

_PRIVILEGE (show if you are logged in as SYSDBA etc)
_DATE (Will display the current date/time depending on date format)

So following settings
ALTER SESSION SET NLS_DATE_FORMAT='HH24:MM';
SET SQLPROMPT "_USER'@'_CONNECT_IDENTIFIER_PRIVILEGE_DATE> "


will give you something like USER@DB AS SYSDBA 16:00> as your sql prompt.