-3

I am new for configuring crontab file. can anyone explain to me how to add Job in crontab file. similarly after adding job how to run this file. quick Response would be appreciate.

Ex: 40 10 * * * rm/home/test/tmp*/

I am trying run this through editing crontab -e but i am unable to delete tmp directory files..

2
  • The entry you added only executes the command at 10:40 AM, is this the problem?
    – ethanwu10
    May 16, 2015 at 22:19
  • No dear any time no problem actually it is not executing May 17, 2015 at 20:51

1 Answer 1

2
  • There is a space after the rm command, and the asterisk to specify all files is after the slash in a path (rm /home/test/tmp/*, not rm/home/test/tmp*/), so make sure the command is entered properly in the crontab

  • Be sure to save when exiting from the editor after opening it using sudo crontab -e. It should automatically run at the next scheduled time provided the cron service is running (which is started at boot)

2
  • I have done it as you mention above still i am unable to delete /tmp directory files. May 17, 2015 at 21:04
  • Dear Brother i am completely new for linux i don't know how to configure corntab file can you plz explain to me from the beginning how to add jobs in crontab file and how to execute crontab file. May 17, 2015 at 21:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .