New Posts  All Forums:Forum Nav:

Cron job...

post #1 of 6
Thread Starter 
So I've been messing with this for an hour and it's really starting to upset me because it's not working. I've Googled and Googled to my wits end and I still can't find an answer.

All I want to do is have a simple script run every hour via Cron but that seems not to work.

Code:
crontab -e
I edit the cron job that I want.

Code:
0 * * * * bash /home/mbudden/Minecraft/backup.sh
Save it. Nothing happens. So I troubleshoot. I try it for every minute.

Code:
* * * * * bash /home/mbudden/Minecraft/backup.sh
Nothing happens.

I have tried in sudo
Code:
sudo crontab -e
and it shows up via
Code:
sudo crontab -l
But nothing happens after a minute.

What is up? I don't get it.
My backup script works when running it via terminal, but cron isn't working. Even restarted cron via
Code:
service cron restart
Some help?
OS: Linux Mint 10 LXDE
post #2 of 6
are you in the /etc/cron.allow file?
according to Wikipedia you may have to be in it.




Quote:
Cron permissions
The following two files play an important role:
/etc/cron.allow - If this file exists, then you must be listed therein (your username must be listed) in order to be allowed to use cron jobs.
/etc/cron.deny - If the cron.allow file does not exist but the /etc/cron.deny file does exist, then you must not be listed in the /etc/cron.deny file in order to use cron jobs.
Please note that if neither of these files exists, then depending on site-dependent configuration parameters, only the super user will be allowed to use cron jobs, or all users will be able to use cron jobs.
post #3 of 6
Also here is another reference that might help you. It is for Ubuntu but if I remember Mint is based off of Ubuntu so there shouldn't be too much difference if any at all.

https://help.ubuntu.com/community/CronHowto
post #4 of 6
Thread Starter 
There is no instance of
Quote:
/etc/cron.allow
Just these folders.



I threw the backup.sh into the cron.hourly folder and chmod'd it. Hopefully it will work as planned.
It seems that though Linux Mint is built off of Ubuntu. Somethings are different.
post #5 of 6
I think I remember reading a bug that said if you don't put a new line in between the comment section when adding a cron job and the first job that you make then that might make it not run.

Think I also remember after reading up on it some more last night that Ubuntu doesn't have the cron.allow and that by default it allows ever one to use cron jobs. So maybe it isn't cron persmissions or anything maybe it is the syntax of your command.
post #6 of 6
Eh, the reason its not working is because * doesnt work for the minute. You need to set it up like this:

Quote:
*/1 * * * * bash /home/mbudden/Minecraft/backup.sh
Desktop
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q9550 EVGA 780SLi EVGA GTX285SSC 4GB OCZ Reaper HPC Edition 
Hard DriveOptical DriveOSPower
150GB Velociraptor x2 - RAID0 2 - Samsung Write Master's Window 7 64-bit 750 Watt OCZ 60 AMPs on +12v 
CaseMouse
LIAN LI PC-V2110B Black Logitech G3 
  hide details  
Reply
Desktop
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q9550 EVGA 780SLi EVGA GTX285SSC 4GB OCZ Reaper HPC Edition 
Hard DriveOptical DriveOSPower
150GB Velociraptor x2 - RAID0 2 - Samsung Write Master's Window 7 64-bit 750 Watt OCZ 60 AMPs on +12v 
CaseMouse
LIAN LI PC-V2110B Black Logitech G3 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix