Timed Script [SOLVED]

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
jackmason
Level 2
Level 2
Posts: 57
Joined: Fri Jan 25, 2013 6:00 pm

Timed Script [SOLVED]

Postby jackmason » Wed Feb 13, 2013 2:53 pm

I want to set up a Firebird script that will run every day at a certain time. The script would be along the lines of:

gbak -B -V 96.38.238.50:e:\datadb1 /mnt/bfl/monday/datadb1.bak
gbak -B -V 96.38.238.50:e:\datadb2 /mnt/bfl/monday/datadb2.bak

Two questions:

1. How do I set up a timed script to run everyday at a given time?
2. Is there a way to have seven scripts (monday, tuesday, wednesday, etc.) and have those run on only selected days?

Thanks for any assistance.
Last edited by jackmason on Wed Feb 13, 2013 6:41 pm, edited 3 times in total.

cecar
Level 4
Level 4
Posts: 371
Joined: Tue Aug 24, 2010 2:47 am
Location: Stenungsund, Sweden

Re: Timed Script

Postby cecar » Wed Feb 13, 2013 2:56 pm

Have a look here in the Cron howto.

https://help.ubuntu.com/community/CronHowto

User avatar
eanfrid
Level 7
Level 7
Posts: 1866
Joined: Mon Apr 30, 2012 2:49 am
Location: FR

Re: Timed Script

Postby eanfrid » Wed Feb 13, 2013 3:22 pm

If you prefer a GUI you can also install the "gnome-schedule" package.
Main desktop: Debian GNU/Linux Jessie 64bit - MATE
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
Safer than Dropbox

jackmason
Level 2
Level 2
Posts: 57
Joined: Fri Jan 25, 2013 6:00 pm

Re: Timed Script

Postby jackmason » Wed Feb 13, 2013 4:07 pm

I installed gnome-schedule and tried to run it. The help indicates: Usage: gnome-schedule.py [OPTION...] but when I try to start gnome-schedule with 'gnome-schedule' in a terminal window, it gets the error:

GnomeUI-WARNING **: While connecting to session manager:
None of the authentication protocols specified are supported.

(gnome-schedule.py:6191): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

If I follow the Usage line and enter gnome-schedule.py, it cannot find the command. What is the proper way to start it?

User avatar
eanfrid
Level 7
Level 7
Posts: 1866
Joined: Mon Apr 30, 2012 2:49 am
Location: FR

Re: Timed Script

Postby eanfrid » Wed Feb 13, 2013 4:41 pm

Its launcher is in the apps menu, under system tools/tasks scheduler or something like that. It is a gtk app to run inside an X session, not a command-line tool :) BTW you should not have a dbus error, unless the dbus daemon is not installed or not started.
Main desktop: Debian GNU/Linux Jessie 64bit - MATE
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
Safer than Dropbox

jackmason
Level 2
Level 2
Posts: 57
Joined: Fri Jan 25, 2013 6:00 pm

Re: Timed Script

Postby jackmason » Wed Feb 13, 2013 5:39 pm

Thank you very much. One further question. In Microsoft Windows, I can create a .bat file with CLI commands in it that will be executed at a given time. What is the Mint equivalent? I know I can put the gbak commands into a file, but if I just reference that file for cron, will it run it or does it have to be a special kind of file or in a special place?

Thanks


Return to “Newbie Questions”

Who is online

Users browsing this forum: ihabhamed, JoeFootball, Neil Edmond and 23 guests