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 this

Timed Script [SOLVED]

Postby jackmason on 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.
jackmason
Level 2
Level 2
 
Posts: 61
Joined: Fri Jan 25, 2013 6:00 pm

Linux Mint is funded by ads and donations.
 

Re: Timed Script

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

Have a look here in the Cron howto.

https://help.ubuntu.com/community/CronHowto
cecar
Level 4
Level 4
 
Posts: 365
Joined: Tue Aug 24, 2010 2:47 am
Location: Stenungsund, Sweden

Re: Timed Script

Postby eanfrid on 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 Wheezy 64bit w/custom 3.14 longterm kernel - MATE 1.8.1
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
True private storage on SpiderOak
User avatar
eanfrid
Level 7
Level 7
 
Posts: 1856
Joined: Mon Apr 30, 2012 2:49 am
Location: FR

Re: Timed Script

Postby jackmason on 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?
jackmason
Level 2
Level 2
 
Posts: 61
Joined: Fri Jan 25, 2013 6:00 pm

Re: Timed Script

Postby eanfrid on 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 Wheezy 64bit w/custom 3.14 longterm kernel - MATE 1.8.1
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
True private storage on SpiderOak
User avatar
eanfrid
Level 7
Level 7
 
Posts: 1856
Joined: Mon Apr 30, 2012 2:49 am
Location: FR

Re: Timed Script

Postby jackmason on 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
jackmason
Level 2
Level 2
 
Posts: 61
Joined: Fri Jan 25, 2013 6:00 pm


Return to Newbie Questions

Who is online

Users browsing this forum: austin.texas, Bing [Bot] and 21 guests