How do I install cron
#1
I ran apt-get update:

Code:
kevin@XBMCLive:~$ sudo apt-get update
Get:1 http://ppa.launchpad.net karmic Release.gpg [307B]
Ign http://ppa.launchpad.net karmic/main Translation-en_US
Get:2 http://ppa.launchpad.net karmic Release [66.0kB]
Get:3 http://ppa.launchpad.net karmic/main Packages [5,755B]
Get:4 http://ppa.launchpad.net karmic/main Sources [1,339B]
Fetched 73.4kB in 1s (61.1kB/s)
Reading package lists... Done

The I ran apt-get install cron:

Code:
kevin@XBMCLive:~$ sudo apt-get install cron
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package cron
kevin@XBMCLive:~$ sudo apt-get install cron
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package cron

What am I doing wrong?
Reply
#2
first,
$sudo apt-cache search cron

then you'll get some packages , choose actual package name, and use '$ sudo apt-get install <package name>'
Reply
#3
cliusn Wrote:first,
$sudo apt-cache search cron

then you'll get some packages , choose actual package name, and use '$ sudo apt-get install <package name>'

Nothing about cron shows up. All that returns is:

Code:
kevin@XBMCLive:~$ sudo apt-cache search cron
xbmc-web-pm3 - XBMC Media Center (Project Mahem III web skin)
xbmc-web-pm - XBMC Media Center (Project Mahem web skin)
xbmc-web-iphone-tlrobinson - XBMC Media Center (Iphone web skin)
xbmc-standalone - XBMC Media Center (standalone program)
xbmc-skin-pm3-hd - XBMC Media Center (PM3 HD skin)
xbmc-skin-confluence - XBMC Media Center (Confluence skin)
xbmc-scripts-example - XBMC Media Center (example scripts)
xbmc-live - XBMC Media Center (XBMC Live package)
xbmc-eventclients-xbmc-send - XBMC Media Center (Event Client XBMC-SEND package)
xbmc-eventclients-wiiremote - XBMC Media Center (Event Client WII Remote support package)
xbmc-eventclients-ps3 - XBMC Media Center (Event Client PS3 package)
xbmc-eventclients-j2me - XBMC Media Center (Event Client J2ME package)
xbmc-eventclients-dev - XBMC Media Center (Event Client Dev package)
xbmc-eventclients-common - XBMC Media Center (Event Client Common package)
xbmc-dbg - XBMC Media Center (debug package)
xbmc-data - XBMC Media Center (arch-independent data package)
xbmc-bin - XBMC Media Center (binary data package)
xbmc - XBMC Media Center (full metapackage)
Reply
#4
Anyone?
Reply
#5
I would check your repositories and/or rebuild the apt DB from scratch - cron is one of the "standard" packages and if it's not installed, it should have been!
Reply
#6
crackers Wrote:I would check your repositories and/or rebuild the apt DB from scratch - cron is one of the "standard" packages and if it's not installed, it should have been!

Really? I have two different boxes running Live and neither seems to have cron installed. I'm at work right now, so I can't chek, but what should be in my sources.list?
Reply
#7
RockDawg Wrote:Really? I have two different boxes running Live and neither seems to have cron installed. I'm at work right now, so I can't chek, but what should be in my sources.list?

Okay, I don't have Live installed, so I can't tell you why it's not there - you'll have to see if you can get the attention of one of the packagers. There are several Ubuntu and Debian repos that should line up.

Try this: https://help.ubuntu.com/community/Reposi...ommandLine

Note: be careful! Make backups, etc.
Reply
#8
What makes you think cron isn't installed?

What makes you think you need to install it?

If you look at your syslog by running:

Code:
cat /var/log/syslog


you should see some cron entries.

I seriously doubt a Ubuntu system even runs without cron installed. As other posters mentioned, it is a basic package that should always be installed with a base Linux system, if it didn't get installed, then your system really needs to be reinstalled from scratch.

If you want to add your own cron entries, you need to edit the /etc/crontab file. If you have a GUI then:

Code:
sudo gedit /etc/crontab

or if you only have cli then:

Code:
sudo vi /etc/crontab

One you save the file, the changes take place automatically and it should work....
Reply
#9
try http://packages.ubuntu.com/karmic/cron and select your version (not sure if Live is Karmic)
Reply
#10
Live is based on Karmic afaik.

I still think there is no need to install cron, since it is installed by default though.
Reply
#11
Disclaimer: I am a total Linux newb, so it's likely I'm doing something wrong.

prupert Wrote:What makes you think cron isn't installed?

Because if i type crontab -e, I get a "command not found" error. Accordinng to what I've read on the net, that is the command to create or open the crontab file.

syslog doesn't contain any cron entries.

sudo vi /etc/crontab crates a new file.

I did notice while browsing through directories that I have a /etc/cron.daily/. That would seem to suggest that it is installed? Like I said, I don't know much about Linux at all. I just want to setup a cron job to run a script for me.
Reply
#12
1.) check your /etc/apt/sources.list file and make sure the following like is there without a # in front of it

deb http://us.archive.ubuntu.com/ubuntu/ karmic main restricted

Note: cron is in main but you may need some of the restricted packages too so I would add it. Also if you are not using karmic then substitute your release for karmic in the above line

2.) run sudo apt-get update
which will update the list of packages from the repo

3.) type apt-cache search ^cron$
Note: the ^ and $ will limit the output to what you want

hopefully you will see cron listed.

4.) sudo apt-get install cron

Hopefully that will sort you out.
Reply
#13
I'm using live and cron was already installed.

To check if a package is installed, do a
dpkg -s cron

or a

dpkg --listfiles cron

or just a

sudo apt-get install cron

to have it installed if it's not already.

good luck,
josef
Reply
#14
RockDawg Wrote:Disclaimer: I am a total Linux newb, so it's likely I'm doing something wrong.



Because if i type crontab -e, I get a "command not found" error. Accordinng to what I've read on the net, that is the command to create or open the crontab file.

syslog doesn't contain any cron entries.

sudo vi /etc/crontab crates a new file.

I did notice while browsing through directories that I have a /etc/cron.daily/. That would seem to suggest that it is installed? Like I said, I don't know much about Linux at all. I just want to setup a cron job to run a script for me.

Ok, I just did some reading.

First, lets see if cron is installed.

Run:

aptitude search cron

This will output all packages with the name cron in it. Search for 'cron' and see what letter is infront of it. If it is i then cron is installed, if it is p then it is not installed, if it is c then it was installed and then removed. (If you get an error that aptitiude is not installed, then first do sudo apt-get install aptitude).

The fact that sudo vi /etc/crontab creates a new file is a worry....XBMC is based on Ubuntu Karmic and it should have crontab installed, I can't see why it has been removed, unless it was to stop the system from updating and potentially causing problems for customisations that the team introduced.

If you have a /etc/cron.daily/ then you can put a script in there and it should run once a day.

And if you have no /etc/crontab, you can just try creating one and adding stuff to it. To get you started here is mine:

Code:
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user    command
17 *    * * *    root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *    root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6    * * 7    root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6    1 * *    root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
@reboot     root    /bin/bash /home/rupert/.startconky
#
Reply
#15
Thanks for all the help guys. I'll try these when I get home tonight.

josef - since you are running Live and have cron, what command allowed you to edit the cron table? Was it crontab -e?
Reply

Logout Mark Read Team Forum Stats Members Help
How do I install cron0