crontab not working... (solved)

Archived topics about LMDE 1
Forum rules
alirezaimi
Level 2
Level 2
Posts: 61
Joined: Tue Feb 08, 2011 5:18 am

crontab not working... (solved)

Postby alirezaimi » Thu Jul 14, 2011 10:09 am

Hi
I used crontab in ubuntu, But in lmde (32bit) not work.
this command that run a script in crontab:

Code: Select all

03 03 * * * env DISPLAY=:0 /home/alireza/autop

and this for shutdown in sudo crontab :

Code: Select all

00 08 * * * /sbin/shutdown -h now


any idea??
Thanks.
Last edited by alirezaimi on Mon Jul 18, 2011 2:50 am, edited 2 times in total.

User avatar
Habitual
Level 12
Level 12
Posts: 4337
Joined: Sun Nov 21, 2010 8:31 pm
Location: Youngstown, Ohio
Contact:

Re: crontab not working...

Postby Habitual » Thu Jul 14, 2011 2:30 pm

I think it needs to be moved to above the actual cronjob like so

Code: Select all

env DISPLAY=:0
03 03 * * * /home/alireza/autop


and it may be export, not env.

but I could be wrong. it happens.
I have never seen it inline like that,
Image

alirezaimi
Level 2
Level 2
Posts: 61
Joined: Tue Feb 08, 2011 5:18 am

Re: crontab not working...

Postby alirezaimi » Thu Jul 14, 2011 2:37 pm

Habitual wrote:I think it needs to be moved to above the actual cronjob like so

Code: Select all

env DISPLAY=:0
03 03 * * * /home/alireza/autop


and it may be export, not env.

but I could be wrong. it happens.
I have never seen it inline like that,

I use that in ubuntu , but i don't know why in lmde not work.
and for second command ?

Thanks.

User avatar
Habitual
Level 12
Level 12
Posts: 4337
Joined: Sun Nov 21, 2010 8:31 pm
Location: Youngstown, Ohio
Contact:

Re: crontab not working...

Postby Habitual » Thu Jul 14, 2011 5:52 pm

Code: Select all

env DISPLAY=:0
03 03 * * * /home/alireza/autop
00 08 * * * /sbin/shutdown -h now


should be the entire cron.
Image

User avatar
lmdeman
Level 1
Level 1
Posts: 42
Joined: Fri May 27, 2011 6:12 am

Re: crontab not working...

Postby lmdeman » Fri Jul 15, 2011 4:04 am

Do you have anacron installed?
I could not make cron jobs work until I installed anacron (which is installed by default on Ubuntu)

alirezaimi
Level 2
Level 2
Posts: 61
Joined: Tue Feb 08, 2011 5:18 am

Re: crontab not working...

Postby alirezaimi » Mon Jul 18, 2011 2:49 am

lmdeman wrote:Do you have anacron installed?
I could not make cron jobs work until I installed anacron (which is installed by default on Ubuntu)

NO, i do not have anacron,
But this problem solved by update system.
Thanks alot my friends.


Return to “Archive”

Who is online

Users browsing this forum: No registered users and 0 guests