Sql cron

How do I run a .sql file cron??

I have this:

/usr/bin/mysql publicsize --user=limited --password=mypasshere < /home/ryannaddy/cron/logOut.sql


In shell is one way.

Promos: MaxTOR: Save [color=#CC0000]Maximum[/color] TOR: Save Maximum and [color=#00CC00]give $1 to TOR[/color]

Are you asking how to set up a cron job or how to run a .sql script in a cron job?

Free unique IP and $67 off with promo code [color=#CC0000]FLENSFREEIP67[/color] or use [color=#CC0000]FLENS97[/color] for $97 off. Click here for more options

I know how to make one, but I am getting errors, when I run that command in PuTTY, Error:

ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

I don’t know the popper command to enter into the text field, so that when my cron job is run, it executes properly, that is what I need help with.

when the .sql file gets run, this is the code that is within the file:

UPDATE users SET onlineStatus = ‘0’ WHERE onlineStatus = ‘1’ AND (UNIX_TIMESTAMP(NOW())-lastAccess > 1800);