crontab not working... (solved)

Questions about applications and software
Forum rules
Before you post please read this

crontab not working... (solved)

Postby alirezaimi on 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.
alirezaimi
Level 2
Level 2
 
Posts: 64
Joined: Tue Feb 08, 2011 5:18 am

Linux Mint is funded by ads and donations.
 

Re: crontab not working...

Postby Habitual on 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,
What's a landing but a take off in reverse?
My DorkBlog
User avatar
Habitual
Level 8
Level 8
 
Posts: 2031
Joined: Sun Nov 21, 2010 8:31 pm
Location: Undecided

Re: crontab not working...

Postby alirezaimi on 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.
alirezaimi
Level 2
Level 2
 
Posts: 64
Joined: Tue Feb 08, 2011 5:18 am

Re: crontab not working...

Postby Habitual on 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.
What's a landing but a take off in reverse?
My DorkBlog
User avatar
Habitual
Level 8
Level 8
 
Posts: 2031
Joined: Sun Nov 21, 2010 8:31 pm
Location: Undecided

Re: crontab not working...

Postby lmdeman on 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)
User avatar
lmdeman
Level 1
Level 1
 
Posts: 38
Joined: Fri May 27, 2011 6:12 am

Re: crontab not working...

Postby alirezaimi on 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.
alirezaimi
Level 2
Level 2
 
Posts: 64
Joined: Tue Feb 08, 2011 5:18 am


Return to Software & Applications

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests