Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I don't have write permissions to /etc and its sub folders, but even do I would like to have bash script that is executed every morning. How to set it up?

also when i type cron in command line I get

cron: can't open or create /var/run/ Permission denied

P.S. This is follow up question to How to append text to file every morning?

P.S.2. Sometimes I don't turn off my computer, so I would rather not use "auto-start"

share|improve this question
up vote 3 down vote accepted

Unless you're actively blocked from doing cron jobs (i.e., not on /etc/cron.allow or on /etc/cron.deny), then you should be able to run your own cron jobs.

Run crontab -e to open the cron job editor. If it's your first time you'll be asked to select a command line editor. You should probably choose nano unless you're familiar with one of the other choices.

Cron entries have the format

m h d mon wkday command

So putting in the entry

00 04 * * * bash

will execute your script at 4:00 am every day.

Save the file and cron will automatically implement it if there are not syntax errors.

See here for more information about cron.

share|improve this answer
I also would to kink to this for common pitfalls: Reasons why crontab does not work – enzotib Nov 8 '11 at 14:57
it worked, thx! – UAdapter Nov 8 '11 at 15:00

gnome-schedule Install gnome-schedule for automatic tasks

Gnome-schedule is a graphical user interface and at to manage your crontab file and provide an easy way to schedule tasks on your computer. It supports recurrent (periodical) tasks and tasks that happen only once in the future.

Supports custom titles and icons for your tasks so that they are more easily to keep track of
Templates support so that you won't have to create the same task again and again; these are saved in gconf and may easily ship them with, say, a Linux distribution
If run as root, you can edit any user's crontab and "at" tasks.
Human-readable strings like "Every hour" instead of "0 * * * *"
Advanced mode for crontab experts
Provides a "panel applet" where you can manage tasks from a dropdown menu
Predefined common expressions like: every minute, every week, tomorrow, next week
A calendar allows you to choose the day you want a task executed

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.