PDA

View Full Version : [ubuntu] Cron, Crontab, etc.



luigi_mb
February 28th, 2009, 04:08 AM
Running Ubuntu 8.10 on ThinkPad T61 with 4GB RAM.

Running


crontab -u luigi -l

I get an empty list. Ditto with


sudo cron -u root -l

Having installed f-prot, I can verify that the virus def list is indeed regularly updated. Shouldn't crontab list the corresponding ask?

Where are tasks located?
Are there other ways to set up scheduled tasks?
Is "at" the only way to do so?

Thanks.

/luigi

hictio
February 28th, 2009, 04:19 AM
I don't have installed but, is it updated daily? Then my guess is that you should check for the script on the '/etc/cron.daily/' directory; check the other directories if its executed hourly, etc.

luigi_mb
February 28th, 2009, 05:10 PM
I don't have installed but, is it updated daily? Then my guess is that you should check for the script on the '/etc/cron.daily/' directory; check the other directories if its executed hourly, etc.

I can see lots of entries under cron.hourly, cron.daily, etc. And I can read the contents of /etc/crontab , where I did find a single entry, for f-prot. I still do not understand why crontab itself does not display this item and all the other items.

Thus my question is: is it possible to list all the scheduled tasks? How?

Thanks.

/luigi

pparks1
February 28th, 2009, 05:18 PM
Well, each user has a crontab file..as you saw when you ran crontab -u username.

The system also has many cronjobs that are found in /etc/crontab that also run. They are cron.daily, cron.hourly, cron.weekly and cron.monthly. Each has a subfolder which can contain any number of scripts and these run based on the times specified in the /etc/crontab file.

As far as I know, you will just have to look in both places...your user account and /etc/crontab to see what is going to be run under cron. I don't know of a way to show absolutely everything together all in one place.

luigi_mb
March 1st, 2009, 01:44 AM
Well, each user has a crontab file..as you saw when you ran crontab -u username.

The system also has many cronjobs that are found in /etc/crontab that also run. They are cron.daily, cron.hourly, cron.weekly and cron.monthly. Each has a subfolder which can contain any number of scripts and these run based on the times specified in the /etc/crontab file.

As far as I know, you will just have to look in both places...your user account and /etc/crontab to see what is going to be run under cron. I don't know of a way to show absolutely everything together all in one place.

Yes, I can see and examine all the scripts in the /etc/cron.*/ folders. Too bad there seems to be no way to show them in one easily browsable place. I wonder whether anybody ever wrote something that would do so.

Until then, I thank you all for your prompt and generous help, and if nobody objects maybe we can consider this thread closed.

/luigi