crontab not working... (solved)

Archived topics about LMDE 1 and LMDE 2
Locked
alirezaimi

crontab not working... (solved)

Post by alirezaimi »

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 LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Habitual

Re: crontab not working...

Post by Habitual »

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,
alirezaimi

Re: crontab not working...

Post by alirezaimi »

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.
Habitual

Re: crontab not working...

Post by Habitual »

Code: Select all

env DISPLAY=:0
03 03 * * * /home/alireza/autop
00 08 * * * /sbin/shutdown -h now
should be the entire cron.
lmdeman

Re: crontab not working...

Post by lmdeman »

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

Re: crontab not working...

Post by alirezaimi »

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.
Locked

Return to “LMDE Archive”