Crontab

hi boys.
how i can schedule a script with crontab ever 5 minutes .
Regards
Francesco

For literally every 5 minutes 24x7 wildcard ('*') all fields except 'minute' where you enter a comma separated list like 0,5,10,15,20,25,30,35,40,45,50,55.

Use the crontab command to configure it. See:

man crontab

Job done.

Also notice that there might be files named /var/adm/cron/cron.allow and/or /var/adm/cron/cron.deny which control which user is allowed to use the crontab command. For details see the IBM documentation here.

I hope this helps.

bakunin

A line of the crontab file:

       0,5,10,15,20,25,30,35,40,45,50,55 * * * /home/jboss/file_arrivati_da_now/invio.sh >> /home/jboss/file_arrivati_da_now/invio.log

contains the following error:
0481-079 Reached a symbol that is not expected

which is the error?
Tnk
regards,

There are 6 fields to a cron line:

  1. Minute (0-59)
  2. Hours (0-23)
  3. Day of month (1-31)
  4. Month of year (1-12)
  5. Day of week (0-6, 0=Sunday)
  6. Command to be run

so only having 3 wildcards after the minute field is going to cause a problem.

1 Like